Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/kern_thread.c
Show First 20 Lines • Show All 526 Lines • ▼ Show 20 Lines | thread_exit(void) | ||||
PROC_LOCK_ASSERT(p, MA_OWNED); | PROC_LOCK_ASSERT(p, MA_OWNED); | ||||
KASSERT(p != NULL, ("thread exiting without a process")); | KASSERT(p != NULL, ("thread exiting without a process")); | ||||
CTR3(KTR_PROC, "thread_exit: thread %p (pid %ld, %s)", td, | CTR3(KTR_PROC, "thread_exit: thread %p (pid %ld, %s)", td, | ||||
(long)p->p_pid, td->td_name); | (long)p->p_pid, td->td_name); | ||||
SDT_PROBE0(proc, , , lwp__exit); | SDT_PROBE0(proc, , , lwp__exit); | ||||
KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending")); | KASSERT(TAILQ_EMPTY(&td->td_sigqueue.sq_list), ("signal pending")); | ||||
#ifdef AUDIT | |||||
AUDIT_SYSCALL_EXIT(0, td); | |||||
#endif | |||||
/* | /* | ||||
* drop FPU & debug register state storage, or any other | * drop FPU & debug register state storage, or any other | ||||
* architecture specific resources that | * architecture specific resources that | ||||
* would not be on a new untouched process. | * would not be on a new untouched process. | ||||
*/ | */ | ||||
cpu_thread_exit(td); | cpu_thread_exit(td); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 722 Lines • Show Last 20 Lines |