Lines Matching refs:pid
55 struct pid struct
71 extern struct pid init_struct_pid; argument
75 struct pid *pidfd_pid(const struct file *file);
76 struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags);
78 int pidfd_prepare(struct pid *pid, unsigned int flags, struct file **ret);
81 static inline struct pid *get_pid(struct pid *pid) in get_pid() argument
83 if (pid) in get_pid()
84 refcount_inc(&pid->count); in get_pid()
85 return pid; in get_pid()
88 extern void put_pid(struct pid *pid);
89 extern struct task_struct *pid_task(struct pid *pid, enum pid_type);
90 static inline bool pid_has_task(struct pid *pid, enum pid_type type) in pid_has_task() argument
92 return !hlist_empty(&pid->tasks[type]); in pid_has_task()
94 extern struct task_struct *get_pid_task(struct pid *pid, enum pid_type);
96 extern struct pid *get_task_pid(struct task_struct *task, enum pid_type type);
104 struct pid *pid);
121 extern struct pid *find_pid_ns(int nr, struct pid_namespace *ns);
122 extern struct pid *find_vpid(int nr);
127 extern struct pid *find_get_pid(int nr);
128 extern struct pid *find_ge_pid(int nr, struct pid_namespace *);
130 extern struct pid *alloc_pid(struct pid_namespace *ns, pid_t *set_tid,
132 extern void free_pid(struct pid *pid);
145 static inline struct pid_namespace *ns_of_pid(struct pid *pid) in ns_of_pid() argument
148 if (pid) in ns_of_pid()
149 ns = pid->numbers[pid->level].ns; in ns_of_pid()
159 static inline bool is_child_reaper(struct pid *pid) in is_child_reaper() argument
161 return pid->numbers[pid->level].nr == 1; in is_child_reaper()
175 static inline pid_t pid_nr(struct pid *pid) in pid_nr() argument
178 if (pid) in pid_nr()
179 nr = pid->numbers[0].nr; in pid_nr()
183 pid_t pid_nr_ns(struct pid *pid, struct pid_namespace *ns);
184 pid_t pid_vnr(struct pid *pid);
186 #define do_each_pid_task(pid, type, task) \ argument
188 if ((pid) != NULL) \
190 &(pid)->tasks[type], pid_links[type]) {
196 #define while_each_pid_task(pid, type, task) \ argument
202 #define do_each_pid_thread(pid, type, task) \ argument
203 do_each_pid_task(pid, type, task) { \
207 #define while_each_pid_thread(pid, type, task) \ argument
210 } while_each_pid_task(pid, type, task)
212 static inline struct pid *task_pid(struct task_struct *task) in task_pid()
232 return tsk->pid; in task_pid_nr()
299 pid_t pid = 0; in task_ppid_nr_ns() local
303 pid = task_tgid_nr_ns(rcu_dereference(tsk->real_parent), ns); in task_ppid_nr_ns()
306 return pid; in task_ppid_nr_ns()