aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/sched.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index ce1e1c0aaa33..45f254dddafc 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2169,15 +2169,15 @@ static inline bool thread_group_leader(struct task_struct *p)
2169 * all we care about is that we have a task with the appropriate 2169 * all we care about is that we have a task with the appropriate
2170 * pid, we don't actually care if we have the right task. 2170 * pid, we don't actually care if we have the right task.
2171 */ 2171 */
2172static inline int has_group_leader_pid(struct task_struct *p) 2172static inline bool has_group_leader_pid(struct task_struct *p)
2173{ 2173{
2174 return p->pid == p->tgid; 2174 return task_pid(p) == p->signal->leader_pid;
2175} 2175}
2176 2176
2177static inline 2177static inline
2178int same_thread_group(struct task_struct *p1, struct task_struct *p2) 2178bool same_thread_group(struct task_struct *p1, struct task_struct *p2)
2179{ 2179{
2180 return p1->tgid == p2->tgid; 2180 return p1->signal == p2->signal;
2181} 2181}
2182 2182
2183static inline struct task_struct *next_thread(const struct task_struct *p) 2183static inline struct task_struct *next_thread(const struct task_struct *p)