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, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index dd597d8013a8..ccd2d1500720 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2147,6 +2147,11 @@ extern bool current_is_single_threaded(void);
2147#define while_each_thread(g, t) \ 2147#define while_each_thread(g, t) \
2148 while ((t = next_thread(t)) != g) 2148 while ((t = next_thread(t)) != g)
2149 2149
2150static inline int get_nr_threads(struct task_struct *tsk)
2151{
2152 return atomic_read(&tsk->signal->count);
2153}
2154
2150/* de_thread depends on thread_group_leader not being a pid based check */ 2155/* de_thread depends on thread_group_leader not being a pid based check */
2151#define thread_group_leader(p) (p == p->group_leader) 2156#define thread_group_leader(p) (p == p->group_leader)
2152 2157