HELPLIB.HLB  —  DCE  DCE_THREADS, Application Routines, pthread_exit
 NAME

    pthread_exit - Terminates the calling thread

 SYNOPSIS

     #include <pthread.h>

     void pthread_exit( pthread_addr_t status );

 PARAMETERS

     status                Address value copied and returned to the
                            caller of pthread_join().

 DESCRIPTION

 The pthread_exit()  routine terminates the calling thread and makes a
 status value available to any thread that calls pthread_join() and
 specifies the terminating thread.

 An implicit call to pthread_exit() 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 pro-
 cess exits when the last running thread calls pthread_exit(), with an
 undefined exit status.

 RESTRICTIONS

 The pthread_exit() 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.

 RELATED INFORMATION

     FUNCTIONS: pthread_create
                pthread_detach
                pthread_join
Close Help