aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pid.h1
-rw-r--r--include/linux/sched.h11
2 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 93da7e2d9f30..359121086de1 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -89,6 +89,7 @@ extern struct pid *FASTCALL(find_pid(int nr));
89 * Lookup a PID in the hash table, and return with it's count elevated. 89 * Lookup a PID in the hash table, and return with it's count elevated.
90 */ 90 */
91extern struct pid *find_get_pid(int nr); 91extern struct pid *find_get_pid(int nr);
92extern struct pid *find_ge_pid(int nr);
92 93
93extern struct pid *alloc_pid(void); 94extern struct pid *alloc_pid(void);
94extern void FASTCALL(free_pid(struct pid *pid)); 95extern void FASTCALL(free_pid(struct pid *pid));
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),