tty.h: remove dead define
[safe/jmp/linux-2.6] / include / linux / init_task.h
index 45170b2..3a619f5 100644 (file)
@@ -8,6 +8,8 @@
 #include <linux/lockdep.h>
 #include <linux/ipc.h>
 #include <linux/pid_namespace.h>
+#include <linux/user_namespace.h>
+#include <net/net_namespace.h>
 
 #define INIT_FDTABLE \
 {                                                      \
@@ -65,9 +67,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;
@@ -77,17 +79,42 @@ extern struct nsproxy init_nsproxy;
        .nslock         = __SPIN_LOCK_UNLOCKED(nsproxy.nslock),         \
        .uts_ns         = &init_uts_ns,                                 \
        .mnt_ns         = NULL,                                         \
+       INIT_NET_NS(net_ns)                                             \
        INIT_IPC_NS(ipc_ns)                                             \
+       .user_ns        = &init_user_ns,                                \
 }
 
 #define INIT_SIGHAND(sighand) {                                                \
        .count          = ATOMIC_INIT(1),                               \
        .action         = { { { .sa_handler = NULL, } }, },             \
        .siglock        = __SPIN_LOCK_UNLOCKED(sighand.siglock),        \
+       .signalfd_wqh   = __WAIT_QUEUE_HEAD_INITIALIZER(sighand.signalfd_wqh),  \
 }
 
 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)
@@ -139,6 +166,12 @@ extern struct group_info init_groups;
        .cpu_timers     = INIT_CPU_TIMERS(tsk.cpu_timers),              \
        .fs_excl        = ATOMIC_INIT(0),                               \
        .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),            \
+       },                                                              \
+       .dirties = INIT_PROP_LOCAL_SINGLE(dirties),                     \
        INIT_TRACE_IRQFLAGS                                             \
        INIT_LOCKDEP                                                    \
 }