diff options
Diffstat (limited to 'include/linux/ipc_namespace.h')
| -rw-r--r-- | include/linux/ipc_namespace.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/include/linux/ipc_namespace.h b/include/linux/ipc_namespace.h index e4451d1da753..ea6c18a8b0d4 100644 --- a/include/linux/ipc_namespace.h +++ b/include/linux/ipc_namespace.h | |||
| @@ -4,6 +4,17 @@ | |||
| 4 | #include <linux/err.h> | 4 | #include <linux/err.h> |
| 5 | #include <linux/idr.h> | 5 | #include <linux/idr.h> |
| 6 | #include <linux/rwsem.h> | 6 | #include <linux/rwsem.h> |
| 7 | #include <linux/notifier.h> | ||
| 8 | |||
| 9 | /* | ||
| 10 | * ipc namespace events | ||
| 11 | */ | ||
| 12 | #define IPCNS_MEMCHANGED 0x00000001 /* Notify lowmem size changed */ | ||
| 13 | #define IPCNS_CREATED 0x00000002 /* Notify new ipc namespace created */ | ||
| 14 | #define IPCNS_REMOVED 0x00000003 /* Notify ipc namespace removed */ | ||
| 15 | |||
| 16 | #define IPCNS_CALLBACK_PRI 0 | ||
| 17 | |||
| 7 | 18 | ||
| 8 | struct ipc_ids { | 19 | struct ipc_ids { |
| 9 | int in_use; | 20 | int in_use; |
| @@ -30,15 +41,24 @@ struct ipc_namespace { | |||
| 30 | size_t shm_ctlall; | 41 | size_t shm_ctlall; |
| 31 | int shm_ctlmni; | 42 | int shm_ctlmni; |
| 32 | int shm_tot; | 43 | int shm_tot; |
| 44 | |||
| 45 | struct notifier_block ipcns_nb; | ||
| 33 | }; | 46 | }; |
| 34 | 47 | ||
| 35 | extern struct ipc_namespace init_ipc_ns; | 48 | extern struct ipc_namespace init_ipc_ns; |
| 49 | extern atomic_t nr_ipc_ns; | ||
| 36 | 50 | ||
| 37 | #ifdef CONFIG_SYSVIPC | 51 | #ifdef CONFIG_SYSVIPC |
| 38 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | 52 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, |
| 39 | #else | 53 | |
| 54 | extern int register_ipcns_notifier(struct ipc_namespace *); | ||
| 55 | extern int cond_register_ipcns_notifier(struct ipc_namespace *); | ||
| 56 | extern int unregister_ipcns_notifier(struct ipc_namespace *); | ||
| 57 | extern int ipcns_notify(unsigned long); | ||
| 58 | |||
| 59 | #else /* CONFIG_SYSVIPC */ | ||
| 40 | #define INIT_IPC_NS(ns) | 60 | #define INIT_IPC_NS(ns) |
| 41 | #endif | 61 | #endif /* CONFIG_SYSVIPC */ |
| 42 | 62 | ||
| 43 | #if defined(CONFIG_SYSVIPC) && defined(CONFIG_IPC_NS) | 63 | #if defined(CONFIG_SYSVIPC) && defined(CONFIG_IPC_NS) |
| 44 | extern void free_ipc_ns(struct kref *kref); | 64 | extern void free_ipc_ns(struct kref *kref); |
