The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 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 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef _LINUX_SHM_H_ |
| 13 | #define _LINUX_SHM_H_ |
| 14 | |
| 15 | #include <linux/ipc.h> |
| 16 | #include <linux/errno.h> |
| 17 | #include <asm/page.h> |
| 18 | |
| 19 | #define SHMMAX 0x2000000 |
| 20 | #define SHMMIN 1 |
| 21 | #define SHMMNI 4096 |
| 22 | #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) |
| 23 | #define SHMSEG SHMMNI |
| 24 | |
| 25 | #include <asm/shmparam.h> |
| 26 | |
| 27 | struct shmid_ds { |
| 28 | struct ipc_perm shm_perm; |
| 29 | int shm_segsz; |
| 30 | __kernel_time_t shm_atime; |
| 31 | __kernel_time_t shm_dtime; |
| 32 | __kernel_time_t shm_ctime; |
| 33 | __kernel_ipc_pid_t shm_cpid; |
| 34 | __kernel_ipc_pid_t shm_lpid; |
| 35 | unsigned short shm_nattch; |
| 36 | unsigned short shm_unused; |
| 37 | void *shm_unused2; |
| 38 | void *shm_unused3; |
| 39 | }; |
| 40 | |
| 41 | #include <asm/shmbuf.h> |
| 42 | |
| 43 | #define SHM_R 0400 |
| 44 | #define SHM_W 0200 |
| 45 | |
| 46 | #define SHM_RDONLY 010000 |
| 47 | #define SHM_RND 020000 |
| 48 | #define SHM_REMAP 040000 |
| 49 | #define SHM_EXEC 0100000 |
| 50 | |
| 51 | #define SHM_LOCK 11 |
| 52 | #define SHM_UNLOCK 12 |
| 53 | |
| 54 | #define SHM_STAT 13 |
| 55 | #define SHM_INFO 14 |
| 56 | |
| 57 | struct shminfo { |
| 58 | int shmmax; |
| 59 | int shmmin; |
| 60 | int shmmni; |
| 61 | int shmseg; |
| 62 | int shmall; |
| 63 | }; |
| 64 | |
| 65 | struct shm_info { |
| 66 | int used_ids; |
| 67 | unsigned long shm_tot; |
| 68 | unsigned long shm_rss; |
| 69 | unsigned long shm_swp; |
| 70 | unsigned long swap_attempts; |
| 71 | unsigned long swap_successes; |
| 72 | }; |
| 73 | |
| 74 | #endif |