aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h43
1 files changed, 6 insertions, 37 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 49df878a0cad..206ac003e8c0 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -547,25 +547,8 @@ struct signal_struct {
547 547
548 struct list_head cpu_timers[3]; 548 struct list_head cpu_timers[3];
549 549
550 /* job control IDs */
551
552 /*
553 * pgrp and session fields are deprecated.
554 * use the task_session_Xnr and task_pgrp_Xnr routines below
555 */
556
557 union {
558 pid_t pgrp __deprecated;
559 pid_t __pgrp;
560 };
561
562 struct pid *tty_old_pgrp; 550 struct pid *tty_old_pgrp;
563 551
564 union {
565 pid_t session __deprecated;
566 pid_t __session;
567 };
568
569 /* boolean value for session group leader */ 552 /* boolean value for session group leader */
570 int leader; 553 int leader;
571 554
@@ -1469,16 +1452,6 @@ static inline int rt_task(struct task_struct *p)
1469 return rt_prio(p->prio); 1452 return rt_prio(p->prio);
1470} 1453}
1471 1454
1472static inline void set_task_session(struct task_struct *tsk, pid_t session)
1473{
1474 tsk->signal->__session = session;
1475}
1476
1477static inline void set_task_pgrp(struct task_struct *tsk, pid_t pgrp)
1478{
1479 tsk->signal->__pgrp = pgrp;
1480}
1481
1482static inline struct pid *task_pid(struct task_struct *task) 1455static inline struct pid *task_pid(struct task_struct *task)
1483{ 1456{
1484 return task->pids[PIDTYPE_PID].pid; 1457 return task->pids[PIDTYPE_PID].pid;
@@ -1552,11 +1525,6 @@ static inline pid_t task_tgid_vnr(struct task_struct *tsk)
1552} 1525}
1553 1526
1554 1527
1555static inline pid_t task_pgrp_nr(struct task_struct *tsk)
1556{
1557 return tsk->signal->__pgrp;
1558}
1559
1560static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk, 1528static inline pid_t task_pgrp_nr_ns(struct task_struct *tsk,
1561 struct pid_namespace *ns) 1529 struct pid_namespace *ns)
1562{ 1530{
@@ -1569,11 +1537,6 @@ static inline pid_t task_pgrp_vnr(struct task_struct *tsk)
1569} 1537}
1570 1538
1571 1539
1572static inline pid_t task_session_nr(struct task_struct *tsk)
1573{
1574 return tsk->signal->__session;
1575}
1576
1577static inline pid_t task_session_nr_ns(struct task_struct *tsk, 1540static inline pid_t task_session_nr_ns(struct task_struct *tsk,
1578 struct pid_namespace *ns) 1541 struct pid_namespace *ns)
1579{ 1542{
@@ -1585,6 +1548,12 @@ static inline pid_t task_session_vnr(struct task_struct *tsk)
1585 return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); 1548 return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL);
1586} 1549}
1587 1550
1551/* obsolete, do not use */
1552static inline pid_t task_pgrp_nr(struct task_struct *tsk)
1553{
1554 return task_pgrp_nr_ns(tsk, &init_pid_ns);
1555}
1556
1588/** 1557/**
1589 * pid_alive - check that a task structure is not stale 1558 * pid_alive - check that a task structure is not stale
1590 * @p: Task structure to be checked. 1559 * @p: Task structure to be checked.