pthread_exit(3-thr) pthread_exit(3-thr)
NAME
pthreadexit - terminates the calling thread
SYNOPSIS
#include <pthread.h>
void pthreadexit(pthreadaddrt status);
PARAMETERS
status Address value copied and returned to the caller of
pthreadjoin().
DESCRIPTION
The pthreadexit() routine terminates the calling thread and makes a
status value available to any thread that calls pthreadjoin() and
specifies the terminating thread.
An implicit call to pthreadexit() is issued when a thread returns
from the start routine that was used to create it. The function's
return value serves as the thread's exit status. If the return value
is -1, an error exit is forced for the thread instead of a normal
exit. The process exits when the last running thread calls
pthreadexit(), with an undefined exit status.
Restrictions
The pthreadexit() routine does not work in the main (initial) thread
because DCE Threads relies on information at the base of thread
stacks; this information does not exist in the main thread.
RETURN VALUES
No value is returned.
SEE ALSO
pthreadcreate(3-thr), pthreaddetach(3-thr), pthreadjoin(3-thr).
Page 1 Reliant UNIX 5.44 Printed 11/98