Lines Matching refs:type

300 	enum pid_type type;  in alloc_pid()  local
331 for (type = 0; type < PIDTYPE_MAX; ++type) in alloc_pid()
332 INIT_HLIST_HEAD(&pid->tasks[type]); in alloc_pid()
389 void attach_pid(struct task_struct *task, enum pid_type type) in attach_pid() argument
391 struct pid_link *link = &task->pids[type]; in attach_pid()
392 hlist_add_head_rcu(&link->node, &link->pid->tasks[type]); in attach_pid()
395 static void __change_pid(struct task_struct *task, enum pid_type type, in __change_pid() argument
402 link = &task->pids[type]; in __change_pid()
415 void detach_pid(struct task_struct *task, enum pid_type type) in detach_pid() argument
417 __change_pid(task, type, NULL); in detach_pid()
420 void change_pid(struct task_struct *task, enum pid_type type, in change_pid() argument
423 __change_pid(task, type, pid); in change_pid()
424 attach_pid(task, type); in change_pid()
429 enum pid_type type) in transfer_pid() argument
431 new->pids[type].pid = old->pids[type].pid; in transfer_pid()
432 hlist_replace_rcu(&old->pids[type].node, &new->pids[type].node); in transfer_pid()
435 struct task_struct *pid_task(struct pid *pid, enum pid_type type) in pid_task() argument
440 first = rcu_dereference_check(hlist_first_rcu(&pid->tasks[type]), in pid_task()
443 result = hlist_entry(first, struct task_struct, pids[(type)].node); in pid_task()
465 struct pid *get_task_pid(struct task_struct *task, enum pid_type type) in get_task_pid() argument
469 if (type != PIDTYPE_PID) in get_task_pid()
471 pid = get_pid(task->pids[type].pid); in get_task_pid()
477 struct task_struct *get_pid_task(struct pid *pid, enum pid_type type) in get_pid_task() argument
481 result = pid_task(pid, type); in get_pid_task()
521 pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type, in __task_pid_nr_ns() argument
530 if (type != PIDTYPE_PID) in __task_pid_nr_ns()
532 nr = pid_nr_ns(task->pids[type].pid, ns); in __task_pid_nr_ns()