Changeset View
Changeset View
Standalone View
Standalone View
head/sys/kern/kern_thr.c
Show First 20 Lines • Show All 347 Lines • ▼ Show 20 Lines | if (p->p_numthreads == p->p_pendingexits + 1) { | ||||
* Ignore attempts to shut down last thread in the | * Ignore attempts to shut down last thread in the | ||||
* proc. This will actually call _exit(2) in the | * proc. This will actually call _exit(2) in the | ||||
* usermode trampoline when it returns. | * usermode trampoline when it returns. | ||||
*/ | */ | ||||
PROC_UNLOCK(p); | PROC_UNLOCK(p); | ||||
return (0); | return (0); | ||||
} | } | ||||
if (p->p_sysent->sv_ontdexit != NULL) | |||||
p->p_sysent->sv_ontdexit(td); | |||||
td->td_dbgflags |= TDB_EXIT; | td->td_dbgflags |= TDB_EXIT; | ||||
if (p->p_ptevents & PTRACE_LWP) { | if (p->p_ptevents & PTRACE_LWP) { | ||||
p->p_pendingexits++; | p->p_pendingexits++; | ||||
ptracestop(td, SIGTRAP, NULL); | ptracestop(td, SIGTRAP, NULL); | ||||
p->p_pendingexits--; | p->p_pendingexits--; | ||||
} | } | ||||
tidhash_remove(td); | tidhash_remove(td); | ||||
▲ Show 20 Lines • Show All 261 Lines • Show Last 20 Lines |