Lines Matching refs:pid
56 struct pid pid0 = {
71 #define HASHPID(pid) (pidhash[((pid)&(pid_hashsz-1))])
93 static struct pid **pidhash;
95 static pid_t mpid = FAMOUS_PIDS; /* one more than the last famous pid */
99 static struct pid *
100 pid_lookup(pid_t pid)
102 struct pid *pidp;
106 for (pidp = HASHPID(pid); pidp; pidp = pidp->pid_link) {
107 if (pidp->pid_id == pid) {
154 * This function allocates a pid structure, a free pid, and optionally a
157 * pid_allocate() returns the new pid on success, -1 on failure.
160 pid_allocate(proc_t *prp, pid_t pid, int flags)
162 struct pid *pidp;
166 pidp = kmem_zalloc(sizeof (struct pid), KM_SLEEP);
176 if (pid != 0) {
178 VERIFY3P(pid, <, mpid);
179 VERIFY3P(pid_lookup(pid), ==, NULL);
180 newpid = pid;
183 * Allocate a pid
202 * Put pid into the pid hash table.
225 kmem_free(pidp, sizeof (struct pid));
230 * decrement the reference count for pid
233 pid_rele(struct pid *pidp)
235 struct pid **pidpp;
256 proc_entry_free(struct pid *pidp)
272 struct pid *pidp;
325 prfind_zone(pid_t pid, zoneid_t zoneid)
327 struct pid *pidp;
333 pidp = pid_lookup(pid);
346 * associated with other zones. Use prfind_zone(pid, ALL_ZONES) to
350 prfind(pid_t pid)
358 return (prfind_zone(pid, zoneid));
364 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));
532 pidhash = kmem_zalloc(sizeof (struct pid *) * pid_hashsz, KM_SLEEP);
578 struct pid *pidp;
602 prsignal(struct pid *pidp, int sig)
620 struct pid *pidp;
639 PID_RELE((struct pid *)pref);
653 struct pid *pidp = pref;