diff options
author | Cedric Le Goater <clg@fr.ibm.com> | 2006-12-08 05:37:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:51 -0500 |
commit | 937949d9edbf4049bd41af6c9f92c26280584564 (patch) | |
tree | d0a28f503b082f890cfa1f7fe952fda8fc771752 /include/linux/sched.h | |
parent | ef55d53caa055aedee13e77da82740987dd64f2d (diff) |
[PATCH] add process_session() helper routine
Replace occurences of task->signal->session by a new process_session() helper
routine.
It will be useful for pid namespaces to abstract the session pid number.
Signed-off-by: Cedric Le Goater <clg@fr.ibm.com>
Cc: Kirill Korotaev <dev@openvz.org>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Herbert Poetzl <herbert@13thfloor.at>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5e8a0ba6174..270d864a8ff 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1047,6 +1047,11 @@ static inline pid_t process_group(struct task_struct *tsk) | |||
1047 | return tsk->signal->pgrp; | 1047 | return tsk->signal->pgrp; |
1048 | } | 1048 | } |
1049 | 1049 | ||
1050 | static inline pid_t process_session(struct task_struct *tsk) | ||
1051 | { | ||
1052 | return tsk->signal->session; | ||
1053 | } | ||
1054 | |||
1050 | static inline struct pid *task_pid(struct task_struct *task) | 1055 | static inline struct pid *task_pid(struct task_struct *task) |
1051 | { | 1056 | { |
1052 | return task->pids[PIDTYPE_PID].pid; | 1057 | return task->pids[PIDTYPE_PID].pid; |