diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index df6049e5e8bf..47cf81d62047 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1237,12 +1237,20 @@ static inline int pid_alive(struct task_struct *p) | |||
1237 | } | 1237 | } |
1238 | 1238 | ||
1239 | /** | 1239 | /** |
1240 | * is_init - check if a task structure is init | 1240 | * is_global_init - check if a task structure is init |
1241 | * @tsk: Task structure to be checked. | 1241 | * @tsk: Task structure to be checked. |
1242 | * | 1242 | * |
1243 | * Check if a task structure is the first user space task the kernel created. | 1243 | * Check if a task structure is the first user space task the kernel created. |
1244 | * | ||
1245 | * TODO: We should inline this function after some cleanups in pid_namespace.h | ||
1246 | */ | ||
1247 | extern int is_global_init(struct task_struct *tsk); | ||
1248 | |||
1249 | /* | ||
1250 | * is_container_init: | ||
1251 | * check whether in the task is init in its own pid namespace. | ||
1244 | */ | 1252 | */ |
1245 | static inline int is_init(struct task_struct *tsk) | 1253 | static inline int is_container_init(struct task_struct *tsk) |
1246 | { | 1254 | { |
1247 | return tsk->pid == 1; | 1255 | return tsk->pid == 1; |
1248 | } | 1256 | } |