pid namespaces: define is_global_init() and is_container_init()
[linux-2.6-block.git] / kernel / pid.c
index 78c0dbffde654c22e4f6c14482e6aaf3f89e1147..bb0785109d39998c63ec881bb4f92fed69efaa87 100644 (file)
@@ -70,6 +70,11 @@ struct pid_namespace init_pid_ns = {
        .child_reaper = &init_task
 };
 
+int is_global_init(struct task_struct *tsk)
+{
+       return tsk == init_pid_ns.child_reaper;
+}
+
 /*
  * Note: disable interrupts while the pidmap_lock is held as an
  * interrupt might come in and do read_lock(&tasklist_lock).