thr_exit(3T)
NAME
thr_exit − thread termination
SYNOPSIS
#include <thread.h>
void thr_exit(void ∗status);
MT-LEVEL
MT-Safe
DESCRIPTION
thr_exit() terminates the calling thread. All thread-specific data bindings are released (see thr_keycreate(3T)). If the calling thread is not detached, then the thread’s ID and the exit status specified by status are retained until it is waited for (see thr_join(3T)). Otherwise, status is ignored and the thread’s ID may be reclaimed immediately.
If the calling thread is the last non-daemon thread in the process (see thr_create(3T)), then the process terminates with a status of zero (see exit(3C)). If the initial thread returns from main() then the process exits with a status equal to the return value.
SEE ALSO
thr_create(3T), thr_join(3T), thr_keycreate(3T), exit(3C).
SunOS 5.2 — Last change: 22 Jan 1993