Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_kthread.c
Show First 20 Lines • Show All 160 Lines • ▼ Show 20 Lines | kproc_exit(int ecode) | ||||
p = td->td_proc; | p = td->td_proc; | ||||
/* | /* | ||||
* Reparent curthread from proc0 to init so that the zombie | * Reparent curthread from proc0 to init so that the zombie | ||||
* is harvested. | * is harvested. | ||||
*/ | */ | ||||
sx_xlock(&proctree_lock); | sx_xlock(&proctree_lock); | ||||
PROC_LOCK(p); | PROC_LOCK(p); | ||||
proc_reparent(p, initproc); | proc_reparent(p, initproc, true); | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
sx_xunlock(&proctree_lock); | sx_xunlock(&proctree_lock); | ||||
/* | /* | ||||
* Wakeup anyone waiting for us to exit. | * Wakeup anyone waiting for us to exit. | ||||
*/ | */ | ||||
wakeup(p); | wakeup(p); | ||||
▲ Show 20 Lines • Show All 312 Lines • Show Last 20 Lines |