ashmem.h revision 651f8383e66a32741d78f485c714ced345db7b3d
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
13#include <stddef.h>
14
15#if defined(__BIONIC__)
16#include <linux/ashmem.h>
17#endif
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23int ashmem_valid(int fd);
24int ashmem_create_region(const char *name, size_t size);
25int ashmem_set_prot_region(int fd, int prot);
26int ashmem_pin_region(int fd, size_t offset, size_t len);
27int ashmem_unpin_region(int fd, size_t offset, size_t len);
28int ashmem_get_size_region(int fd);
29
30#ifdef __cplusplus
31}
32#endif
33
34#endif	/* _CUTILS_ASHMEM_H */
35