X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=include%2Flinux%2Finit_task.h;h=276ccaa2670c06892b8e5b402c1561750da6bc03;hb=0560551dca0c02a4b23f95a9c339882ff291e1c7;hp=a2d95ff50e9bd71eb741d5ef9a293574245ab244;hpb=60f29b1e1600d89aee5e529acb4b276a6650cb8b;p=powerpc.git diff --git a/include/linux/init_task.h b/include/linux/init_task.h index a2d95ff50e..276ccaa267 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -65,9 +65,9 @@ .posix_timers = LIST_HEAD_INIT(sig.posix_timers), \ .cpu_timers = INIT_CPU_TIMERS(sig.cpu_timers), \ .rlim = INIT_RLIMITS, \ - .pgrp = 1, \ + .pgrp = 0, \ .tty_old_pgrp = NULL, \ - { .__session = 1}, \ + { .__session = 0}, \ } extern struct nsproxy init_nsproxy; @@ -84,10 +84,33 @@ extern struct nsproxy init_nsproxy; .count = ATOMIC_INIT(1), \ .action = { { { .sa_handler = NULL, } }, }, \ .siglock = __SPIN_LOCK_UNLOCKED(sighand.siglock), \ + .signalfd_list = LIST_HEAD_INIT(sighand.signalfd_list), \ } extern struct group_info init_groups; +#define INIT_STRUCT_PID { \ + .count = ATOMIC_INIT(1), \ + .nr = 0, \ + /* Don't put this struct pid in pid_hash */ \ + .pid_chain = { .next = NULL, .pprev = NULL }, \ + .tasks = { \ + { .first = &init_task.pids[PIDTYPE_PID].node }, \ + { .first = &init_task.pids[PIDTYPE_PGID].node }, \ + { .first = &init_task.pids[PIDTYPE_SID].node }, \ + }, \ + .rcu = RCU_HEAD_INIT, \ +} + +#define INIT_PID_LINK(type) \ +{ \ + .node = { \ + .next = NULL, \ + .pprev = &init_struct_pid.tasks[type].first, \ + }, \ + .pid = &init_struct_pid, \ +} + /* * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB) @@ -95,7 +118,7 @@ extern struct group_info init_groups; #define INIT_TASK(tsk) \ { \ .state = 0, \ - .thread_info = &init_thread_info, \ + .stack = &init_thread_info, \ .usage = ATOMIC_INIT(2), \ .flags = 0, \ .lock_depth = -1, \ @@ -138,7 +161,12 @@ extern struct group_info init_groups; .journal_info = NULL, \ .cpu_timers = INIT_CPU_TIMERS(tsk.cpu_timers), \ .fs_excl = ATOMIC_INIT(0), \ - .pi_lock = SPIN_LOCK_UNLOCKED, \ + .pi_lock = __SPIN_LOCK_UNLOCKED(tsk.pi_lock), \ + .pids = { \ + [PIDTYPE_PID] = INIT_PID_LINK(PIDTYPE_PID), \ + [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ + [PIDTYPE_SID] = INIT_PID_LINK(PIDTYPE_SID), \ + }, \ INIT_TRACE_IRQFLAGS \ INIT_LOCKDEP \ }