thrd_detach Subroutine
Purpose
This subroutine detaches the thr
thread.
Library
Standard C Library (libc.a)
Syntax
#include <threads.h>
int thrd_detach(thrd_t thr);
Description
The thrd_detach subroutine
instructs the operating system to return any resources that are allocated
to the thread identified by the thr
parameter during
the thread termination. The thread that is identified by the thr
parameter
is not a previously detached thread or a joined thread with another
thread.
Parameters
Item | Description |
---|---|
thr |
Holds the identifier of the newly created thread. |
Return Values
The thrd_detach subroutine returns thrd_success on successful completion or it returns thrd_error if the request does not complete.
Files
Item | Description |
---|---|
threads.h | Standard macros, data types, and subroutines are defined by the threads.h file. |