summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-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 8cf9b11..dba1b2d 100644
--- a/include/linux/pid.h
+++ b/include/linux/pid.h
@@ -94,6 +94,14 @@ extern struct pid *find_ge_pid(int nr);
extern struct pid *alloc_pid(void);
extern void FASTCALL(free_pid(struct pid *pid));
+static inline pid_t pid_nr(struct pid *pid)
+{
+ pid_t nr = 0;
+ if (pid)
+ nr = pid->nr;
+ return nr;
+}
+
#define pid_next(task, type) \
((task)->pids[(type)].node.next)
OpenPOWER on IntegriCloud