Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ thr_exit(3T) — SunOS 5.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exit(3C)

thr_create(3T)

thr_join(3T)

thr_keycreate(3T)

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

exit(3C), thr_create(3T), thr_join(3T), thr_keycreate(3T)

SunOS 5.4  —  Last change: 22 Jan 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026