THREAD_EXIT(9)
π¦ thread_exit(9) β abandon current thread context π¦
okay so this page is from the Kernel Developer's Manual, and the vibe is: a thread is clocking out for good π β¨
πΈ NAME πΈ
thread_exit β abandon current thread context
β¨ SYNOPSIS β¨
#include <sys/param.h>
#include <sys/proc.h>
void
thread_exit(void);
π DESCRIPTION π
The thread_exit() function is literally the machine independent prelude to a thread shutdown. It will not return β no cap, it is not coming back β and it will result in a call to mi_switch(9) to schedule some other thread. π«Ά
thread_exit() arranges to free all the resources of the thread, specifically the kernel stack. Like, it is handling the cleanup, bestie π§Ήβ¨
To protectrunqueue(9),thread_exit()must be called with thesched_lockmutex held. This is not optional β hold that mutex. ππ
π₯ SEE ALSO π₯
This page is from Debian, dated July 5, 2002 β mwah, historical icon behavior π π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2002 Julian Elischer
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms