f_pthread_exit(ret)

Purpose

This subroutine can be called explicitly to terminate the calling thread before it returns from the entry subroutine. The actions taken depend on the state of the calling thread. If it is in non-detached state, the calling thread will wait to be joined. If the thread is in detached state, or when it is joined by another thread, the calling thread will terminate safely. First, the cleanup stack will be popped and executed, and then any thread-specific data will be destructed by the destructors. Finally, the thread resources are freed and the argument ret will be returned to the joining threads. The argument ret of this subroutine is optional. Currently, argument ret is limited to be an Integer pointer. If it is not an Integer pointer, the behavior is undefined.

This subroutine never returns. If argument ret is not provided, NULL will be provided as this thread's exit status.

Class

Subroutine

Argument Type and Attributes

ret
Integer pointer, OPTIONAL, INTENT(IN)

Result Type and Attributes

None

Result Value

None IBM Copyright 2003