Lines Matching refs:pid

57 struct pid pid0 = {
72 #define HASHPID(pid) (pidhash[((pid)&(pid_hashsz-1))])
94 static struct pid **pidhash;
96 static pid_t mpid = FAMOUS_PIDS; /* one more than the last famous pid */
100 static struct pid *
101 pid_lookup(pid_t pid)
103 struct pid *pidp;
107 for (pidp = HASHPID(pid); pidp; pidp = pidp->pid_link) {
108 if (pidp->pid_id == pid) {
155 * This function allocates a pid structure, a free pid, and optionally a
158 * pid_allocate() returns the new pid on success, -1 on failure.
161 pid_allocate(proc_t *prp, pid_t pid, int flags)
163 struct pid *pidp;
167 pidp = kmem_zalloc(sizeof (struct pid), KM_SLEEP);
177 if (pid != 0) {
179 VERIFY3P(pid, <, mpid);
180 VERIFY3P(pid_lookup(pid), ==, NULL);
181 newpid = pid;
184 * Allocate a pid
203 * Put pid into the pid hash table.
226 kmem_free(pidp, sizeof (struct pid));
231 * decrement the reference count for pid
234 pid_rele(struct pid *pidp)
236 struct pid **pidpp;
257 proc_entry_free(struct pid *pidp)
273 struct pid *pidp;
326 prfind_zone(pid_t pid, zoneid_t zoneid)
328 struct pid *pidp;
334 pidp = pid_lookup(pid);
347 * associated with other zones. Use prfind_zone(pid, ALL_ZONES) to
351 prfind(pid_t pid)
359 return (prfind_zone(pid, zoneid));
365 struct pid *pidp;
448 * If pid exists, find its proc, acquire its p_lock and mark it P_PR_LOCK.
454 sprlock_zone(pid_t pid, zoneid_t zoneid)
461 if ((p = prfind_zone(pid, zoneid)) == NULL) {
484 sprlock(pid_t pid)
492 return (sprlock_zone(pid, zoneid));
530 pidhash = kmem_zalloc(sizeof (struct pid *) * pid_hashsz, KM_SLEEP);
576 struct pid *pidp;
600 prsignal(struct pid *pidp, int sig)
618 struct pid *pidp;
637 PID_RELE((struct pid *)pref);
651 struct pid *pidp = pref;