Lines Matching refs:pid_ns
56 static inline int mk_pid(struct pid_namespace *pid_ns,
59 return (map - pid_ns->pidmap)*BITS_PER_PAGE + off;
140 * We might be racing with someone else trying to set pid_ns->last_pid.
147 * 'base' is the value of pid_ns->last_pid that we observed when
152 static void set_last_pid(struct pid_namespace *pid_ns, int base, int pid)
158 last_write = cmpxchg(&pid_ns->last_pid, prev, pid);
162 static int alloc_pidmap(struct pid_namespace *pid_ns)
164 int i, offset, max_scan, pid, last = pid_ns->last_pid;
171 map = &pid_ns->pidmap[pid/BITS_PER_PAGE];
199 set_last_pid(pid_ns, last, pid);
203 pid = mk_pid(pid_ns, map, offset);
206 if (map < &pid_ns->pidmap[(pid_max-1)/BITS_PER_PAGE]) {
210 map = &pid_ns->pidmap[0];
215 pid = mk_pid(pid_ns, map, offset);
220 int next_pidmap(struct pid_namespace *pid_ns, int last)
226 map = &pid_ns->pidmap[(last + 1)/BITS_PER_PAGE];
227 end = &pid_ns->pidmap[PIDMAP_ENTRIES];
233 return mk_pid(pid_ns, map, offset);
342 return find_pid_ns(nr, current->nsproxy->pid_ns);
424 return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns);
476 return pid_nr_ns(pid, current->nsproxy->pid_ns);
487 ns = current->nsproxy->pid_ns;