1 #ifndef _LINUX_PID_NS_H
2 #define _LINUX_PID_NS_H
4 #include <linux/sched.h>
6 #include <linux/threads.h>
8 #include <linux/nsproxy.h>
9 #include <linux/kref.h>
16 #define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8)
18 struct pid_namespace {
20 struct pidmap pidmap[PIDMAP_ENTRIES];
24 extern struct pid_namespace init_pid_ns;
26 static inline void get_pid_ns(struct pid_namespace *ns)
31 extern int copy_pid_ns(int flags, struct task_struct *tsk);
32 extern void free_pid_ns(struct kref *kref);
34 static inline void put_pid_ns(struct pid_namespace *ns)
36 kref_put(&ns->kref, free_pid_ns);
39 #endif /* _LINUX_PID_NS_H */