blob: 5b28f8fe0f4906d30377786a40f2b3d363754846 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Elliott Hughes8cb52b02013-11-21 13:43:23 -08007#ifndef _UAPI_LINUX_ASHMEM_H
8#define _UAPI_LINUX_ASHMEM_H
9#include <linux/ioctl.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070010#include <linux/types.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070011#define ASHMEM_NAME_LEN 256
Elliott Hughes8cb52b02013-11-21 13:43:23 -080012#define ASHMEM_NAME_DEF "dev/ashmem"
13#define ASHMEM_NOT_PURGED 0
14#define ASHMEM_WAS_PURGED 1
Christopher Ferris106b3a82016-08-24 12:15:38 -070015#define ASHMEM_IS_UNPINNED 0
Elliott Hughes8cb52b02013-11-21 13:43:23 -080016#define ASHMEM_IS_PINNED 1
17struct ashmem_pin {
Tao Baod7db5942015-01-28 10:07:51 -080018 __u32 offset;
Christopher Ferris106b3a82016-08-24 12:15:38 -070019 __u32 len;
Elliott Hughes8cb52b02013-11-21 13:43:23 -080020};
21#define __ASHMEMIOC 0x77
22#define ASHMEM_SET_NAME _IOW(__ASHMEMIOC, 1, char[ASHMEM_NAME_LEN])
Christopher Ferris106b3a82016-08-24 12:15:38 -070023#define ASHMEM_GET_NAME _IOR(__ASHMEMIOC, 2, char[ASHMEM_NAME_LEN])
Elliott Hughes8cb52b02013-11-21 13:43:23 -080024#define ASHMEM_SET_SIZE _IOW(__ASHMEMIOC, 3, size_t)
25#define ASHMEM_GET_SIZE _IO(__ASHMEMIOC, 4)
26#define ASHMEM_SET_PROT_MASK _IOW(__ASHMEMIOC, 5, unsigned long)
Christopher Ferris106b3a82016-08-24 12:15:38 -070027#define ASHMEM_GET_PROT_MASK _IO(__ASHMEMIOC, 6)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080028#define ASHMEM_PIN _IOW(__ASHMEMIOC, 7, struct ashmem_pin)
29#define ASHMEM_UNPIN _IOW(__ASHMEMIOC, 8, struct ashmem_pin)
30#define ASHMEM_GET_PIN_STATUS _IO(__ASHMEMIOC, 9)
Christopher Ferris106b3a82016-08-24 12:15:38 -070031#define ASHMEM_PURGE_ALL_CACHES _IO(__ASHMEMIOC, 10)
Christopher Ferris6cd53a52022-12-12 23:39:16 +000032#define ASHMEM_GET_FILE_ID _IOR(__ASHMEMIOC, 11, unsigned long)
Elliott Hughes8cb52b02013-11-21 13:43:23 -080033#endif