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.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index e194ec75833d..e3539c14e47e 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1209,9 +1209,10 @@ extern void wait_task_inactive(task_t * p);
1209#define while_each_thread(g, t) \ 1209#define while_each_thread(g, t) \
1210 while ((t = next_thread(t)) != g) 1210 while ((t = next_thread(t)) != g)
1211 1211
1212#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)
1213 1214
1214static inline task_t *next_thread(task_t *p) 1215static inline task_t *next_thread(const task_t *p)
1215{ 1216{
1216 return list_entry(rcu_dereference(p->thread_group.next), 1217 return list_entry(rcu_dereference(p->thread_group.next),
1217 task_t, thread_group); 1218 task_t, thread_group);