| #include <uapi/linux/shm.h> |
| #define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */ |
| #include <asm/shmparam.h> |
| struct shmid_kernel /* private to the kernel */ |
| struct kern_ipc_perm shm_perm; |
| unsigned long shm_nattch; |
| struct user_struct *mlock_user; |
| /* The task created the shm object. NULL if the task is dead. */ |
| struct task_struct *shm_creator; |
| /* shm_mode upper byte flags */ |
| #define SHM_DEST 01000 /* segment will be destroyed on last detach */ |
| #define SHM_LOCKED 02000 /* segment will not be swapped */ |
| #define SHM_HUGETLB 04000 /* segment will use huge TLB pages */ |
| #define SHM_NORESERVE 010000 /* don't check for reservations */ |
| long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr, |
| extern int is_file_shm_hugepages(struct file *file); |
| extern void exit_shm(struct task_struct *task); |
| static inline long do_shmat(int shmid, char __user *shmaddr, |
| int shmflg, unsigned long *addr, |
| static inline int is_file_shm_hugepages(struct file *file) |
| static inline void exit_shm(struct task_struct *task) |
| #endif /* _LINUX_SHM_H_ */ |