3fbc964864
Define a per-container pid space object. And create one instance of this object, init_pspace, to define the entire pid space. Subsequent patches will provide/use interfaces to create/destroy pid spaces. Its a subset/rework of Eric Biederman's patch http://lkml.org/lkml/2006/2/6/285 . Signed-off-by: Eric Biederman <ebiederm@xmission.com> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Kirill Korotaev <dev@sw.ru> Cc: Andrey Savochkin <saw@sw.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
23 lines
441 B
C
23 lines
441 B
C
#ifndef _LINUX_PSPACE_H
|
|
#define _LINUX_PSPACE_H
|
|
|
|
#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)
|
|
|
|
struct pspace {
|
|
struct pidmap pidmap[PIDMAP_ENTRIES];
|
|
int last_pid;
|
|
};
|
|
|
|
extern struct pspace init_pspace;
|
|
|
|
#endif /* _LINUX_PSPACE_H */
|