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

Function thread_free_batched

freebsd/kern/kern_thread.c:753–770  ·  view source on GitHub ↗

* Deallocate a thread. */

Source from the content-addressed store, hash-verified

751 * Deallocate a thread.
752 */
753static void
754thread_free_batched(struct thread *td)
755{
756
757 lock_profile_thread_exit(td);
758 if (td->td_cpuset)
759 cpuset_rel(td->td_cpuset);
760 td->td_cpuset = NULL;
761 cpu_thread_free(td);
762 if (td->td_kstack != 0)
763 vm_thread_dispose(td);
764 callout_drain(&td->td_slpcallout);
765 /*
766 * Freeing handled by the caller.
767 */
768 td->td_tid = -1;
769 uma_zfree(thread_zone, td);
770}
771
772void
773thread_free(struct thread *td)

Callers 2

thread_reap_domainFunction · 0.85
thread_freeFunction · 0.85

Calls 5

lock_profile_thread_exitFunction · 0.85
cpuset_relFunction · 0.85
vm_thread_disposeFunction · 0.85
cpu_thread_freeFunction · 0.50
uma_zfreeFunction · 0.50

Tested by

no test coverage detected