| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 1 | /* cutils/ashmem.h | 
|  | 2 | ** | 
|  | 3 | ** Copyright 2008 The Android Open Source Project | 
|  | 4 | ** | 
|  | 5 | ** This file is dual licensed.  It may be redistributed and/or modified | 
|  | 6 | ** under the terms of the Apache 2.0 License OR version 2 of the GNU | 
|  | 7 | ** General Public License. | 
|  | 8 | */ | 
|  | 9 |  | 
|  | 10 | #ifndef _CUTILS_ASHMEM_H | 
|  | 11 | #define _CUTILS_ASHMEM_H | 
|  | 12 |  | 
| Carl Shapiro | 143b370 | 2010-02-12 12:45:28 -0800 | [diff] [blame] | 13 | #include <stddef.h> | 
| Mathias Agopian | 1d3faaf | 2009-04-10 14:24:31 -0700 | [diff] [blame] | 14 |  | 
| Elliott Hughes | 427c605 | 2016-05-13 14:47:30 -0700 | [diff] [blame] | 15 | #if defined(__BIONIC__) | 
|  | 16 | #include <linux/ashmem.h> | 
|  | 17 | #endif | 
|  | 18 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 19 | #ifdef __cplusplus | 
|  | 20 | extern "C" { | 
|  | 21 | #endif | 
|  | 22 |  | 
|  | 23 | int ashmem_create_region(const char *name, size_t size); | 
|  | 24 | int ashmem_set_prot_region(int fd, int prot); | 
|  | 25 | int ashmem_pin_region(int fd, size_t offset, size_t len); | 
|  | 26 | int ashmem_unpin_region(int fd, size_t offset, size_t len); | 
| Bjorn Bringert | 7be52b1 | 2009-06-02 00:41:09 +0100 | [diff] [blame] | 27 | int ashmem_get_size_region(int fd); | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 28 |  | 
|  | 29 | #ifdef __cplusplus | 
|  | 30 | } | 
|  | 31 | #endif | 
|  | 32 |  | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 33 | #endif	/* _CUTILS_ASHMEM_H */ |