thread_exit(9freebsd)

thread_exit9freebsd

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.

Releases

9 releases since Debian 5.0 (Lenny); the text changed 6 times.

  1. 5.0
  2. 6.0
  3. 7
  4. 8
  5. 9
  6. 10
  7. 11–13

From freebsd-manpages 12.2-2 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.