aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorCedric Le Goater <clg@fr.ibm.com>2006-12-08 05:37:54 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:51 -0500
commit937949d9edbf4049bd41af6c9f92c26280584564 (patch)
treed0a28f503b082f890cfa1f7fe952fda8fc771752 /include
parentef55d53caa055aedee13e77da82740987dd64f2d (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')
-rw-r--r--include/linux/sched.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 5e8a0ba61749..270d864a8ff1 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
1050static inline pid_t process_session(struct task_struct *tsk)
1051{
1052 return tsk->signal->session;
1053}
1054
1050static inline struct pid *task_pid(struct task_struct *task) 1055static 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;