thread_exit(9)

thread_exit9

Abandon current thread context

Usage

#include <sys/param.h>

#include <sys/proc.h>

void

thread_exit(void);

Overview

The thread_exit() 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.

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

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

From freebsd-manpages 6.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.