Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 142582
b: refs/heads/master
c: 614b84c
h: refs/heads/master
v: v3
  • Loading branch information
Serge E. Hallyn authored and Linus Torvalds committed Apr 7, 2009
1 parent 06c955a commit 64ab91b
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 72 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 909e6d94795654040ed416ac69858d5d2ce66dd3
refs/heads/master: 614b84cf4e4a920d2af32b8f147ea1e3b8c27ea6
39 changes: 35 additions & 4 deletions trunk/include/linux/ipc_namespace.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,24 +44,55 @@ struct ipc_namespace {
int shm_tot;

struct notifier_block ipcns_nb;

/* The kern_mount of the mqueuefs sb. We take a ref on it */
struct vfsmount *mq_mnt;

/* # queues in this ns, protected by mq_lock */
unsigned int mq_queues_count;

/* next fields are set through sysctl */
unsigned int mq_queues_max; /* initialized to DFLT_QUEUESMAX */
unsigned int mq_msg_max; /* initialized to DFLT_MSGMAX */
unsigned int mq_msgsize_max; /* initialized to DFLT_MSGSIZEMAX */

};

extern struct ipc_namespace init_ipc_ns;
extern atomic_t nr_ipc_ns;

#ifdef CONFIG_SYSVIPC
#if defined(CONFIG_POSIX_MQUEUE) || defined(CONFIG_SYSVIPC)
#define INIT_IPC_NS(ns) .ns = &init_ipc_ns,
#else
#define INIT_IPC_NS(ns)
#endif

#ifdef CONFIG_SYSVIPC
extern int register_ipcns_notifier(struct ipc_namespace *);
extern int cond_register_ipcns_notifier(struct ipc_namespace *);
extern void unregister_ipcns_notifier(struct ipc_namespace *);
extern int ipcns_notify(unsigned long);

#else /* CONFIG_SYSVIPC */
#define INIT_IPC_NS(ns)
static inline int register_ipcns_notifier(struct ipc_namespace *ns)
{ return 0; }
static inline int cond_register_ipcns_notifier(struct ipc_namespace *ns)
{ return 0; }
static inline void unregister_ipcns_notifier(struct ipc_namespace *ns) { }
static inline int ipcns_notify(unsigned long l) { return 0; }
#endif /* CONFIG_SYSVIPC */

#if defined(CONFIG_SYSVIPC) && defined(CONFIG_IPC_NS)
#ifdef CONFIG_POSIX_MQUEUE
extern void mq_init_ns(struct ipc_namespace *ns);
/* default values */
#define DFLT_QUEUESMAX 256 /* max number of message queues */
#define DFLT_MSGMAX 10 /* max number of messages in each queue */
#define HARD_MSGMAX (131072/sizeof(void *))
#define DFLT_MSGSIZEMAX 8192 /* max message size */
#else
#define mq_init_ns(ns) ((void) 0)
#endif

#if 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);
Expand Down
4 changes: 2 additions & 2 deletions trunk/init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -670,10 +670,10 @@ config UTS_NS

config IPC_NS
bool "IPC namespace"
depends on NAMESPACES && SYSVIPC
depends on NAMESPACES && (SYSVIPC || POSIX_MQUEUE)
help
In this namespace tasks work with IPC ids which correspond to
different IPC objects in different namespaces
different IPC objects in different namespaces.

config USER_NS
bool "User namespace (EXPERIMENTAL)"
Expand Down
Loading

0 comments on commit 64ab91b

Please sign in to comment.