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, 11 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7ef899c47c29..be658e33bd26 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1358,6 +1358,17 @@ extern void wait_task_inactive(struct task_struct * p);
1358/* de_thread depends on thread_group_leader not being a pid based check */ 1358/* de_thread depends on thread_group_leader not being a pid based check */
1359#define thread_group_leader(p) (p == p->group_leader) 1359#define thread_group_leader(p) (p == p->group_leader)
1360 1360
1361/* Do to the insanities of de_thread it is possible for a process
1362 * to have the pid of the thread group leader without actually being
1363 * the thread group leader. For iteration through the pids in proc
1364 * all we care about is that we have a task with the appropriate
1365 * pid, we don't actually care if we have the right task.
1366 */
1367static inline int has_group_leader_pid(struct task_struct *p)
1368{
1369 return p->pid == p->tgid;
1370}
1371
1361static inline struct task_struct *next_thread(const struct task_struct *p) 1372static inline struct task_struct *next_thread(const struct task_struct *p)
1362{ 1373{
1363 return list_entry(rcu_dereference(p->thread_group.next), 1374 return list_entry(rcu_dereference(p->thread_group.next),