Using exit or _exit when the thread is not the IPT

Table 1 describes the actions that are taken for exit or _exit issued from a thread created with pthread_create.

Table 1. Using exit or _exit when the thread is not the IPT
Step Thread 1 (initial pthread-creating task, or IPT) Thread 2 (pthread-created thread)
1   A request to exit the process was issued.
2   A pthread_quiesce is issued. Control is not returned until all other pthreads in this process end with pthread_exit_and_get.
3 An asynchronous quiesce event is delivered to this thread.  
4 Either the thread is terminated by the kernel, or the signal interface routine intercepts the quiesce termination event to do necessary thread cleanup and issue another pthread_exit_and_get. Interception of quiesce events must be specified by the mvssigsetup service.  
5 The IPT thread is terminated, and the IPT is placed in a wait state in the kernel.  
6   Control is returned from pthread_quiesce when all other pthreads terminate.
8   An _exit service request is issued to terminate the process and pass the process status. This pthread and task are both terminated, and control is not returned to the _exit service caller.
9 The kernel posts the IPT when the last pthread terminates.  
10 The mvsprocclp service is issued to clean up any remaining portions of the process. Control returns from this service after all subtasks created with pthread_create terminate, or when a reasonable amount of time to do this has elapsed.  
11 The IPT gains control after the mvsprocclp service completes. All pthreads for this process and all subtasks of the IPT have terminated.  
12 The IPT is no longer associated with the kernel and can now return to its caller or to the system.