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.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 541f4828f5e7..e3539c14e47e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -684,6 +684,7 @@ static inline void prefetch_stack(struct task_struct *t) { }
684 684
685struct audit_context; /* See audit.c */ 685struct audit_context; /* See audit.c */
686struct mempolicy; 686struct mempolicy;
687struct pipe_inode_info;
687 688
688enum sleep_type { 689enum sleep_type {
689 SLEEP_NORMAL, 690 SLEEP_NORMAL,
@@ -882,6 +883,11 @@ struct task_struct {
882 883
883 atomic_t fs_excl; /* holding fs exclusive resources */ 884 atomic_t fs_excl; /* holding fs exclusive resources */
884 struct rcu_head rcu; 885 struct rcu_head rcu;
886
887 /*
888 * cache last used pipe for splice
889 */
890 struct pipe_inode_info *splice_pipe;
885}; 891};
886 892
887static inline pid_t process_group(struct task_struct *tsk) 893static inline pid_t process_group(struct task_struct *tsk)
@@ -1203,9 +1209,10 @@ extern void wait_task_inactive(task_t * p);
1203#define while_each_thread(g, t) \ 1209#define while_each_thread(g, t) \
1204 while ((t = next_thread(t)) != g) 1210 while ((t = next_thread(t)) != g)
1205 1211
1206#define thread_group_leader(p) (p->pid == p->tgid) 1212/* de_thread depends on thread_group_leader not being a pid based check */
1213#define thread_group_leader(p) (p == p->group_leader)
1207 1214
1208static inline task_t *next_thread(task_t *p) 1215static inline task_t *next_thread(const task_t *p)
1209{ 1216{
1210 return list_entry(rcu_dereference(p->thread_group.next), 1217 return list_entry(rcu_dereference(p->thread_group.next),
1211 task_t, thread_group); 1218 task_t, thread_group);