pid_namespace.h 455 字节
Newer Older
1 2
#ifndef _LINUX_PID_NS_H
#define _LINUX_PID_NS_H
3 4 5 6 7 8 9 10 11 12 13 14 15

#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/threads.h>
#include <linux/pid.h>

struct pidmap {
       atomic_t nr_free;
       void *page;
};

#define PIDMAP_ENTRIES         ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8)

16
struct pid_namespace {
S
Sukadev Bhattiprolu 已提交
17 18 19 20
       struct pidmap pidmap[PIDMAP_ENTRIES];
       int last_pid;
};

21
extern struct pid_namespace init_pid_ns;
S
Sukadev Bhattiprolu 已提交
22

23
#endif /* _LINUX_PID_NS_H */