Lines Matching refs:nr
40 #define pid_hashfn(nr, ns) \ argument
41 hash_long((unsigned long)nr + (unsigned long)ns, pidhash_shift)
91 if (pid != NULL && pid->numbers[pid->level].nr == 1) in is_container_init()
117 int nr = upid->nr; in free_pidmap() local
118 struct pidmap *map = upid->ns->pidmap + nr / BITS_PER_PAGE; in free_pidmap()
119 int offset = nr & BITS_PER_PAGE_MASK; in free_pidmap()
246 int i, nr; in alloc_pid() local
256 nr = alloc_pidmap(tmp); in alloc_pid()
257 if (nr < 0) in alloc_pid()
260 pid->numbers[i].nr = nr; in alloc_pid()
275 &pid_hash[pid_hashfn(upid->nr, upid->ns)]); in alloc_pid()
291 struct pid *find_pid_ns(int nr, struct pid_namespace *ns) in find_pid_ns() argument
297 &pid_hash[pid_hashfn(nr, ns)], pid_chain) in find_pid_ns()
298 if (pnr->nr == nr && pnr->ns == ns) in find_pid_ns()
306 struct pid *find_vpid(int nr) in find_vpid() argument
308 return find_pid_ns(nr, current->nsproxy->pid_ns); in find_vpid()
381 struct task_struct *find_task_by_pid_type_ns(int type, int nr, in find_task_by_pid_type_ns() argument
384 return pid_task(find_pid_ns(nr, ns), type); in find_task_by_pid_type_ns()
396 struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns) in find_task_by_pid_ns() argument
398 return find_task_by_pid_type_ns(PIDTYPE_PID, nr, ns); in find_task_by_pid_ns()
422 struct pid *find_get_pid(pid_t nr) in find_get_pid() argument
427 pid = get_pid(find_vpid(nr)); in find_get_pid()
437 pid_t nr = 0; in pid_nr_ns() local
442 nr = upid->nr; in pid_nr_ns()
444 return nr; in pid_nr_ns()
488 struct pid *find_ge_pid(int nr, struct pid_namespace *ns) in find_ge_pid() argument
493 pid = find_pid_ns(nr, ns); in find_ge_pid()
496 nr = next_pidmap(ns, nr); in find_ge_pid()
497 } while (nr > 0); in find_ge_pid()