thrd_exit Subroutine
Purpose
This subroutine ends the thread from running.
Library
Standard C Library (libc.a)
Syntax
#include <threads.h>_Noreturn void thrd_exit(int res); Description
The thrd_exit subroutine ends the calling thread from running and sets its result code to res.
The program ends normally after the last thread is stopped. The behavior is the same as if the program called the exit subroutine with the EXIT_SUCCESS status when the thread ends.
Parameters
| Item | Description |
|---|---|
| res | Holds the result code of the calling thread. |
Return Values
The thrd_exit subroutine returns no value.
Files
| Item | Description |
|---|---|
| threads.h | Standard macros, data types, and subroutines are defined by the threads.h file. |