aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/pid.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index b3e6d7c41b97..73a60e265f52 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -369,6 +369,25 @@ struct task_struct *find_task_by_pid_type_ns(int type, int nr,
369 369
370EXPORT_SYMBOL(find_task_by_pid_type_ns); 370EXPORT_SYMBOL(find_task_by_pid_type_ns);
371 371
372struct task_struct *find_task_by_pid(pid_t nr)
373{
374 return find_task_by_pid_type_ns(PIDTYPE_PID, nr, &init_pid_ns);
375}
376EXPORT_SYMBOL(find_task_by_pid);
377
378struct task_struct *find_task_by_vpid(pid_t vnr)
379{
380 return find_task_by_pid_type_ns(PIDTYPE_PID, vnr,
381 current->nsproxy->pid_ns);
382}
383EXPORT_SYMBOL(find_task_by_vpid);
384
385struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
386{
387 return find_task_by_pid_type_ns(PIDTYPE_PID, nr, ns);
388}
389EXPORT_SYMBOL(find_task_by_pid_ns);
390
372struct pid *get_task_pid(struct task_struct *task, enum pid_type type) 391struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
373{ 392{
374 struct pid *pid; 393 struct pid *pid;