]> err.no Git - linux-2.6/blobdiff - include/linux/ipc_namespace.h
pci/irq: restore mask_bits in msi shutdown -v3
[linux-2.6] / include / linux / ipc_namespace.h
index a491fc9dd2319b7c90fa19b05a111abc7ba747c2..e4451d1da7534205dad7e7adfba595ab9d929064 100644 (file)
@@ -2,11 +2,20 @@
 #define __IPC_NAMESPACE_H__
 
 #include <linux/err.h>
+#include <linux/idr.h>
+#include <linux/rwsem.h>
+
+struct ipc_ids {
+       int in_use;
+       unsigned short seq;
+       unsigned short seq_max;
+       struct rw_semaphore rw_mutex;
+       struct idr ipcs_idr;
+};
 
-struct ipc_ids;
 struct ipc_namespace {
        struct kref     kref;
-       struct ipc_ids  *ids[3];
+       struct ipc_ids  ids[3];
 
        int             sem_ctls[4];
        int             used_sems;
@@ -34,7 +43,10 @@ extern struct ipc_namespace init_ipc_ns;
 #if defined(CONFIG_SYSVIPC) && defined(CONFIG_IPC_NS)
 extern void free_ipc_ns(struct kref *kref);
 extern struct ipc_namespace *copy_ipcs(unsigned long flags,
-                                               struct ipc_namespace *ns);
+                                      struct ipc_namespace *ns);
+extern void free_ipcs(struct ipc_namespace *ns, struct ipc_ids *ids,
+                     void (*free)(struct ipc_namespace *,
+                                  struct kern_ipc_perm *));
 
 static inline struct ipc_namespace *get_ipc_ns(struct ipc_namespace *ns)
 {