diff options
Diffstat (limited to 'include/linux/pid.h')
-rw-r--r-- | include/linux/pid.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index 3c8ef5a199ca..2a83e434db9d 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h @@ -3,6 +3,8 @@ #define _LINUX_PID_H #include <linux/rculist.h> +#include <linux/wait.h> +#include <linux/refcount.h> enum pid_type { @@ -56,10 +58,12 @@ struct upid { struct pid { - atomic_t count; + refcount_t count; unsigned int level; /* lists of tasks that use this pid */ struct hlist_head tasks[PIDTYPE_MAX]; + /* wait queue for pidfd notifications */ + wait_queue_head_t wait_pidfd; struct rcu_head rcu; struct upid numbers[1]; }; @@ -71,7 +75,7 @@ extern const struct file_operations pidfd_fops; static inline struct pid *get_pid(struct pid *pid) { if (pid) - atomic_inc(&pid->count); + refcount_inc(&pid->count); return pid; } |