| Defined in header |
_Noreturn void thrd_exit( int res );
First, for every thread-specific storage key which was created with a non-null destructor and for which the associated value is non-null (see
thrd_exit sets the value associated with the key to
NULL and then invokes the destructor with the previous value of the key. The order in which the destructors are invoked is unspecified.
thrd_exit function terminates execution of the calling thread and sets its result code to
If the last thread in the program is terminated with
thrd_exit, the entire program terminates as if by calling
EXIT_SUCCESS as the argument (so the functions registered by
atexit are executed in the context of that last thread).
|res||-||the result value to return|
| blocks until a thread terminates
| detaches a thread
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.