Detach a thread from a process
#include <threads.h> int thrd_detach( thrd_t thr );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The thrd_detach() function detaches the thread with the given ID from its process. When a detached thread terminates, all system resources allocated to that thread are immediately reclaimed.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |