7ebe66670c592d64cba6b829ce42307b141e44cb
1 #ifndef _LINUX_NSPROXY_H
2 #define _LINUX_NSPROXY_H
4 #include <linux/spinlock.h>
5 #include <linux/sched.h>
10 * A structure to contain pointers to all per-process
11 * namespaces - fs (mount), uts, network, sysvipc, etc.
13 * 'count' is the number of tasks holding a reference.
14 * The count for each namespace, then, will be the number
15 * of nsproxies pointing to it, not the number of tasks.
17 * The nsproxy is shared by tasks which share all namespaces.
18 * As soon as a single namespace is cloned or unshared, the
24 struct namespace *namespace;
26 extern struct nsproxy init_nsproxy
;
28 struct nsproxy
*dup_namespaces(struct nsproxy
*orig
);
29 int copy_namespaces(int flags
, struct task_struct
*tsk
);
30 void get_task_namespaces(struct task_struct
*tsk
);
31 void free_nsproxy(struct nsproxy
*ns
);
33 static inline void put_nsproxy(struct nsproxy
*ns
)
35 if (atomic_dec_and_test(&ns
->count
)) {
40 static inline void exit_task_namespaces(struct task_struct
*p
)
42 struct nsproxy
*ns
= p
->nsproxy
;
This page took 0.034052 seconds and 4 git commands to generate.