Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_thr.c
Show First 20 Lines • Show All 368 Lines • ▼ Show 20 Lines | kern_thr_exit(struct thread *td) | ||||
* The check above should prevent all other threads from this | * The check above should prevent all other threads from this | ||||
* process from exiting while the PROC_LOCK is dropped, so | * process from exiting while the PROC_LOCK is dropped, so | ||||
* there must be at least one other thread other than the | * there must be at least one other thread other than the | ||||
* current thread. | * current thread. | ||||
*/ | */ | ||||
KASSERT(p->p_numthreads > 1, ("too few threads")); | KASSERT(p->p_numthreads > 1, ("too few threads")); | ||||
racct_sub(p, RACCT_NTHR, 1); | racct_sub(p, RACCT_NTHR, 1); | ||||
tdsigcleanup(td); | tdsigcleanup(td); | ||||
#ifdef AUDIT | |||||
AUDIT_SYSCALL_EXIT(0, td); | |||||
#endif | |||||
PROC_SLOCK(p); | PROC_SLOCK(p); | ||||
thread_stopped(p); | thread_stopped(p); | ||||
thread_exit(); | thread_exit(); | ||||
/* NOTREACHED */ | /* NOTREACHED */ | ||||
} | } | ||||
int | int | ||||
sys_thr_kill(struct thread *td, struct thr_kill_args *uap) | sys_thr_kill(struct thread *td, struct thr_kill_args *uap) | ||||
▲ Show 20 Lines • Show All 239 Lines • Show Last 20 Lines |