aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/pid.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 8cf9b11ed264..dba1b2d677a3 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -94,6 +94,14 @@ extern struct pid *find_ge_pid(int nr);
94extern struct pid *alloc_pid(void); 94extern struct pid *alloc_pid(void);
95extern void FASTCALL(free_pid(struct pid *pid)); 95extern void FASTCALL(free_pid(struct pid *pid));
96 96
97static inline pid_t pid_nr(struct pid *pid)
98{
99 pid_t nr = 0;
100 if (pid)
101 nr = pid->nr;
102 return nr;
103}
104
97#define pid_next(task, type) \ 105#define pid_next(task, type) \
98 ((task)->pids[(type)].node.next) 106 ((task)->pids[(type)].node.next)
99 107