mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 21:21:09 +00:00
statically initialize struct pid for swapper
Statically initialize a struct pid for the swapper process (pid_t == 0) and attach it to init_task. This is needed so task_pid(), task_pgrp() and task_session() interfaces work on the swapper process also. Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com> Cc: Cedric Le Goater <clg@fr.ibm.com> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: Eric Biederman <ebiederm@xmission.com> Cc: Herbert Poetzl <herbert@13thfloor.at> Cc: <containers@lists.osdl.org> Acked-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
e713d0dab2
commit
820e45db23
3 changed files with 31 additions and 0 deletions
|
@ -27,11 +27,13 @@
|
|||
#include <linux/bootmem.h>
|
||||
#include <linux/hash.h>
|
||||
#include <linux/pid_namespace.h>
|
||||
#include <linux/init_task.h>
|
||||
|
||||
#define pid_hashfn(nr) hash_long((unsigned long)nr, pidhash_shift)
|
||||
static struct hlist_head *pid_hash;
|
||||
static int pidhash_shift;
|
||||
static struct kmem_cache *pid_cachep;
|
||||
struct pid init_struct_pid = INIT_STRUCT_PID;
|
||||
|
||||
int pid_max = PID_MAX_DEFAULT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue