Lines Matching refs:type
163 enum pid_type type; in alloc_pid() local
215 for (type = 0; type < PIDTYPE_MAX; ++type) in alloc_pid()
216 INIT_HLIST_HEAD(&pid->tasks[type]); in alloc_pid()
273 static struct pid **task_pid_ptr(struct task_struct *task, enum pid_type type) in task_pid_ptr() argument
275 return (type == PIDTYPE_PID) ? in task_pid_ptr()
277 &task->signal->pids[type]; in task_pid_ptr()
283 void attach_pid(struct task_struct *task, enum pid_type type) in attach_pid() argument
285 struct pid *pid = *task_pid_ptr(task, type); in attach_pid()
286 hlist_add_head_rcu(&task->pid_links[type], &pid->tasks[type]); in attach_pid()
289 static void __change_pid(struct task_struct *task, enum pid_type type, in __change_pid() argument
292 struct pid **pid_ptr = task_pid_ptr(task, type); in __change_pid()
298 hlist_del_rcu(&task->pid_links[type]); in __change_pid()
308 void detach_pid(struct task_struct *task, enum pid_type type) in detach_pid() argument
310 __change_pid(task, type, NULL); in detach_pid()
313 void change_pid(struct task_struct *task, enum pid_type type, in change_pid() argument
316 __change_pid(task, type, pid); in change_pid()
317 attach_pid(task, type); in change_pid()
322 enum pid_type type) in transfer_pid() argument
324 if (type == PIDTYPE_PID) in transfer_pid()
326 hlist_replace_rcu(&old->pid_links[type], &new->pid_links[type]); in transfer_pid()
329 struct task_struct *pid_task(struct pid *pid, enum pid_type type) in pid_task() argument
334 first = rcu_dereference_check(hlist_first_rcu(&pid->tasks[type]), in pid_task()
337 result = hlist_entry(first, struct task_struct, pid_links[(type)]); in pid_task()
371 struct pid *get_task_pid(struct task_struct *task, enum pid_type type) in get_task_pid() argument
375 pid = get_pid(rcu_dereference(*task_pid_ptr(task, type))); in get_task_pid()
381 struct task_struct *get_pid_task(struct pid *pid, enum pid_type type) in get_pid_task() argument
385 result = pid_task(pid, type); in get_pid_task()
425 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, in __task_pid_nr_ns() argument
434 nr = pid_nr_ns(rcu_dereference(*task_pid_ptr(task, type)), ns); in __task_pid_nr_ns()