man.bsd.lv manual page server

Manual Page Search Parameters

THREAD_EXIT(9) Kernel Developer's Manual THREAD_EXIT(9)

thread_exitabandon current thread context

#include <sys/param.h>
#include <sys/proc.h>

void
thread_exit(void);

The () function implements the machine independent prelude to a thread shutdown. It will not return, and will result in a call to mi_switch(9) to schedule some other thread.

() arranges to free all the resources of the thread, specifically the kernel stack.

To protect the runqueue(9), () must be called with the sched_lock mutex held.

mi_switch(9), mutex(9), runqueue(9), sleep(9)

July 5, 2002 FreeBSD-12.0