summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorCedric Le Goater <clg@fr.ibm.com>2006-12-08 02:37:55 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 08:28:51 -0800
commit1ec320afdc9552c92191d5f89fcd1ebe588334ca (patch)
treee526fb29f9487f1ea34aa9ccdf14c318aea2159f /include/linux/sched.h
parent937949d9edbf4049bd41af6c9f92c26280584564 (diff)
downloadop-kernel-dev-1ec320afdc9552c92191d5f89fcd1ebe588334ca.zip
op-kernel-dev-1ec320afdc9552c92191d5f89fcd1ebe588334ca.tar.gz
[PATCH] add process_session() helper routine: deprecate old field
Add an anonymous union and ((deprecated)) to catch direct usage of the session field. [akpm@osdl.org: fix various missed conversions] [jdike@addtoit.com: fix UML bug] Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Cedric Le Goater <clg@fr.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.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 270d864..6fec1d4 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -436,7 +436,12 @@ struct signal_struct {
/* job control IDs */
pid_t pgrp;
pid_t tty_old_pgrp;
- pid_t session;
+
+ union {
+ pid_t session __deprecated;
+ pid_t __session;
+ };
+
/* boolean value for session group leader */
int leader;
@@ -1047,9 +1052,19 @@ static inline pid_t process_group(struct task_struct *tsk)
return tsk->signal->pgrp;
}
+static inline pid_t signal_session(struct signal_struct *sig)
+{
+ return sig->__session;
+}
+
static inline pid_t process_session(struct task_struct *tsk)
{
- return tsk->signal->session;
+ return signal_session(tsk->signal);
+}
+
+static inline void set_signal_session(struct signal_struct *sig, pid_t session)
+{
+ sig->__session = session;
}
static inline struct pid *task_pid(struct task_struct *task)
OpenPOWER on IntegriCloud