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