pthread_exit(3P)
pthread_exit - terminate the calling thread
As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.
NAME pthread_exit - terminate the calling thread C SYNOPSIS #include <pthread.h> void pthread_exit(void *retval); DESCRIPTION The pthread_exit() function terminates the calling thread. If the thread is not detached, then the value retval may be retrieved by pthread_join(). If a thread returns from its start function [see pthread_create()] it acts as if it had called pthread_exit() with retval as the value returned. A thread implicitly exits when it acts on a cancellation request [see pthread_cancel()]. When a thread exits it pops and executes any cancellation handlers which are still active [see pthread_cleanup_push()]. Following the handlers, per-thread data is destroyed by invoking the destructor function for any non-zero thread specific values associated with active keys [see pthread_key_create()]. When the last thread terminates the process exits with a zero status value. DIAGNOSTICS No value is returned by pthread_exit(). SEE ALSO pthread_create(3P), pthread_join(3P), pthread_cancel(3P), pthread_cleanup_push(3P), pthread_key_create(3P).