mm: hwpoison: fix action_result() to print out dirty/clean
[deliverable/linux.git] / include / linux / shm.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_SHM_H_
2#define _LINUX_SHM_H_
3
1da177e4 4#include <asm/page.h>
607ca46e 5#include <uapi/linux/shm.h>
1da177e4 6
1da177e4 7#define SHMALL (SHMMAX/PAGE_SIZE*(SHMMNI/16)) /* max shm system wide (pages) */
1da177e4 8#include <asm/shmparam.h>
1da177e4
LT
9struct shmid_kernel /* private to the kernel */
10{
11 struct kern_ipc_perm shm_perm;
12 struct file * shm_file;
1da177e4
LT
13 unsigned long shm_nattch;
14 unsigned long shm_segsz;
15 time_t shm_atim;
16 time_t shm_dtim;
17 time_t shm_ctim;
18 pid_t shm_cprid;
19 pid_t shm_lprid;
20 struct user_struct *mlock_user;
5774ed01
VK
21
22 /* The task created the shm object. NULL if the task is dead. */
23 struct task_struct *shm_creator;
1da177e4
LT
24};
25
26/* shm_mode upper byte flags */
27#define SHM_DEST 01000 /* segment will be destroyed on last detach */
28#define SHM_LOCKED 02000 /* segment will not be swapped */
29#define SHM_HUGETLB 04000 /* segment will use huge TLB pages */
bf8f972d 30#define SHM_NORESERVE 010000 /* don't check for reservations */
1da177e4
LT
31
32#ifdef CONFIG_SYSVIPC
079a96ae
WD
33long do_shmat(int shmid, char __user *shmaddr, int shmflg, unsigned long *addr,
34 unsigned long shmlba);
516dffdc 35extern int is_file_shm_hugepages(struct file *file);
b34a6b1d 36extern void exit_shm(struct task_struct *task);
1da177e4
LT
37#else
38static inline long do_shmat(int shmid, char __user *shmaddr,
079a96ae
WD
39 int shmflg, unsigned long *addr,
40 unsigned long shmlba)
1da177e4
LT
41{
42 return -ENOSYS;
43}
516dffdc
AL
44static inline int is_file_shm_hugepages(struct file *file)
45{
46 return 0;
47}
b34a6b1d
VK
48static inline void exit_shm(struct task_struct *task)
49{
50}
1da177e4
LT
51#endif
52
1da177e4 53#endif /* _LINUX_SHM_H_ */
This page took 0.953465 seconds and 5 git commands to generate.