blob: 54d79095e2959f7c935a3e7dd51e5ea3e9eac6e3 [file] [log] [blame]
Sukadev Bhattiprolu61a58c62006-12-08 02:37:58 -08001#ifndef _LINUX_PID_NS_H
2#define _LINUX_PID_NS_H
Sukadev Bhattiproluaa5a6662006-10-02 02:17:23 -07003
4#include <linux/sched.h>
5#include <linux/mm.h>
6#include <linux/threads.h>
7#include <linux/pid.h>
8
9struct pidmap {
10 atomic_t nr_free;
11 void *page;
12};
13
14#define PIDMAP_ENTRIES ((PID_MAX_LIMIT + 8*PAGE_SIZE - 1)/PAGE_SIZE/8)
15
Sukadev Bhattiprolu61a58c62006-12-08 02:37:58 -080016struct pid_namespace {
Sukadev Bhattiprolu3fbc9642006-10-02 02:17:24 -070017 struct pidmap pidmap[PIDMAP_ENTRIES];
18 int last_pid;
19};
20
Sukadev Bhattiprolu61a58c62006-12-08 02:37:58 -080021extern struct pid_namespace init_pid_ns;
Sukadev Bhattiprolu3fbc9642006-10-02 02:17:24 -070022
Sukadev Bhattiprolu61a58c62006-12-08 02:37:58 -080023#endif /* _LINUX_PID_NS_H */