1 /**************************************************************************** 2 **************************************************************************** 3 *** 4 *** This header was automatically generated from a Linux kernel header 5 *** of the same name, to make information necessary for userspace to 6 *** call into the kernel available to libc. It contains only constants, 7 *** structures, and macros generated from the original header, and thus, 8 *** contains no copyrightable information. 9 *** 10 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _LINUX_SHM_H_ 20 #define _LINUX_SHM_H_ 21 #include <linux/ipc.h> 22 #include <linux/errno.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 #include <asm/page.h> 25 #define SHMMAX 0x2000000 26 #define SHMMIN 1 27 #define SHMMNI 4096 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) 30 #define SHMSEG SHMMNI 31 #include <asm/shmparam.h> 32 struct shmid_ds { 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 struct ipc_perm shm_perm; 35 int shm_segsz; 36 __kernel_time_t shm_atime; 37 __kernel_time_t shm_dtime; 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 __kernel_time_t shm_ctime; 40 __kernel_ipc_pid_t shm_cpid; 41 __kernel_ipc_pid_t shm_lpid; 42 unsigned short shm_nattch; 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 unsigned short shm_unused; 45 void *shm_unused2; 46 void *shm_unused3; 47 }; 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 #include <asm/shmbuf.h> 50 #define SHM_R 0400 51 #define SHM_W 0200 52 #define SHM_RDONLY 010000 53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 54 #define SHM_RND 020000 55 #define SHM_REMAP 040000 56 #define SHM_EXEC 0100000 57 #define SHM_LOCK 11 58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 59 #define SHM_UNLOCK 12 60 #define SHM_STAT 13 61 #define SHM_INFO 14 62 struct shminfo { 63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 64 int shmmax; 65 int shmmin; 66 int shmmni; 67 int shmseg; 68 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 69 int shmall; 70 }; 71 struct shm_info { 72 int used_ids; 73 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 74 unsigned long shm_tot; 75 unsigned long shm_rss; 76 unsigned long shm_swp; 77 unsigned long swap_attempts; 78 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 79 unsigned long swap_successes; 80 }; 81 #endif 82