aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/pid.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index 78c0dbffde65..bb0785109d39 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -70,6 +70,11 @@ struct pid_namespace init_pid_ns = {
70 .child_reaper = &init_task 70 .child_reaper = &init_task
71}; 71};
72 72
73int is_global_init(struct task_struct *tsk)
74{
75 return tsk == init_pid_ns.child_reaper;
76}
77
73/* 78/*
74 * Note: disable interrupts while the pidmap_lock is held as an 79 * Note: disable interrupts while the pidmap_lock is held as an
75 * interrupt might come in and do read_lock(&tasklist_lock). 80 * interrupt might come in and do read_lock(&tasklist_lock).