diff options
Diffstat (limited to 'include/linux/ipc.h')
-rw-r--r-- | include/linux/ipc.h | 52 |
1 files changed, 0 insertions, 52 deletions
diff --git a/include/linux/ipc.h b/include/linux/ipc.h index 408696ea5189..b8826107b518 100644 --- a/include/linux/ipc.h +++ b/include/linux/ipc.h | |||
@@ -100,58 +100,6 @@ struct kern_ipc_perm | |||
100 | void *security; | 100 | void *security; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | struct ipc_ids; | ||
104 | struct ipc_namespace { | ||
105 | struct kref kref; | ||
106 | struct ipc_ids *ids[3]; | ||
107 | |||
108 | int sem_ctls[4]; | ||
109 | int used_sems; | ||
110 | |||
111 | int msg_ctlmax; | ||
112 | int msg_ctlmnb; | ||
113 | int msg_ctlmni; | ||
114 | atomic_t msg_bytes; | ||
115 | atomic_t msg_hdrs; | ||
116 | |||
117 | size_t shm_ctlmax; | ||
118 | size_t shm_ctlall; | ||
119 | int shm_ctlmni; | ||
120 | int shm_tot; | ||
121 | }; | ||
122 | |||
123 | extern struct ipc_namespace init_ipc_ns; | ||
124 | |||
125 | #ifdef CONFIG_SYSVIPC | ||
126 | #define INIT_IPC_NS(ns) .ns = &init_ipc_ns, | ||
127 | extern void free_ipc_ns(struct kref *kref); | ||
128 | extern struct ipc_namespace *copy_ipcs(unsigned long flags, | ||
129 | struct ipc_namespace *ns); | ||
130 | #else | ||
131 | #define INIT_IPC_NS(ns) | ||
132 | static inline struct ipc_namespace *copy_ipcs(unsigned long flags, | ||
133 | struct ipc_namespace *ns) | ||
134 | { | ||
135 | return ns; | ||
136 | } | ||
137 | #endif | ||
138 | |||
139 | static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns) | ||
140 | { | ||
141 | #ifdef CONFIG_SYSVIPC | ||
142 | if (ns) | ||
143 | kref_get(&ns->kref); | ||
144 | #endif | ||
145 | return ns; | ||
146 | } | ||
147 | |||
148 | static inline void put_ipc_ns(struct ipc_namespace *ns) | ||
149 | { | ||
150 | #ifdef CONFIG_SYSVIPC | ||
151 | kref_put(&ns->kref, free_ipc_ns); | ||
152 | #endif | ||
153 | } | ||
154 | |||
155 | #endif /* __KERNEL__ */ | 103 | #endif /* __KERNEL__ */ |
156 | 104 | ||
157 | #endif /* _LINUX_IPC_H */ | 105 | #endif /* _LINUX_IPC_H */ |