MCPcopy Create free account
hub / github.com/F-Stack/f-stack / thread_unlink

Function thread_unlink

freebsd/kern/kern_thread.c:1016–1030  ·  view source on GitHub ↗

* Called from: * thread_exit() */

Source from the content-addressed store, hash-verified

1014 * thread_exit()
1015 */
1016void
1017thread_unlink(struct thread *td)
1018{
1019 struct proc *p = td->td_proc;
1020
1021 PROC_LOCK_ASSERT(p, MA_OWNED);
1022#ifdef EPOCH_TRACE
1023 MPASS(SLIST_EMPTY(&td->td_epochs));
1024#endif
1025
1026 TAILQ_REMOVE(&p->p_threads, td, td_plist);
1027 p->p_numthreads--;
1028 /* could clear a few other things here */
1029 /* Must NOT clear links to proc! */
1030}
1031
1032static int
1033calc_remaining(struct proc *p, int mode)

Callers 1

thread_exitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected