diff options
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 77e8cad3b17a..511cc4549f58 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1514,8 +1514,35 @@ extern struct task_struct init_task; | |||
1514 | 1514 | ||
1515 | extern struct mm_struct init_mm; | 1515 | extern struct mm_struct init_mm; |
1516 | 1516 | ||
1517 | #define find_task_by_pid(nr) find_task_by_pid_type(PIDTYPE_PID, nr) | 1517 | extern struct pid_namespace init_pid_ns; |
1518 | extern struct task_struct *find_task_by_pid_type(int type, int pid); | 1518 | |
1519 | /* | ||
1520 | * find a task by one of its numerical ids | ||
1521 | * | ||
1522 | * find_task_by_pid_type_ns(): | ||
1523 | * it is the most generic call - it finds a task by all id, | ||
1524 | * type and namespace specified | ||
1525 | * find_task_by_pid_ns(): | ||
1526 | * finds a task by its pid in the specified namespace | ||
1527 | * find_task_by_pid_type(): | ||
1528 | * finds a task by its global id with the specified type, e.g. | ||
1529 | * by global session id | ||
1530 | * find_task_by_pid(): | ||
1531 | * finds a task by its global pid | ||
1532 | * | ||
1533 | * see also find_pid() etc in include/linux/pid.h | ||
1534 | */ | ||
1535 | |||
1536 | extern struct task_struct *find_task_by_pid_type_ns(int type, int pid, | ||
1537 | struct pid_namespace *ns); | ||
1538 | |||
1539 | #define find_task_by_pid_ns(nr, ns) \ | ||
1540 | find_task_by_pid_type_ns(PIDTYPE_PID, nr, ns) | ||
1541 | #define find_task_by_pid_type(type, nr) \ | ||
1542 | find_task_by_pid_type_ns(type, nr, &init_pid_ns) | ||
1543 | #define find_task_by_pid(nr) \ | ||
1544 | find_task_by_pid_type(PIDTYPE_PID, nr) | ||
1545 | |||
1519 | extern void __set_special_pids(pid_t session, pid_t pgrp); | 1546 | extern void __set_special_pids(pid_t session, pid_t pgrp); |
1520 | 1547 | ||
1521 | /* per-UID process charging. */ | 1548 | /* per-UID process charging. */ |