![]() |
![]() |
![]() |
![]() |
Detach a thread from a process
#include <sys/neutrino.h> int ThreadDetach( int tid ); int ThreadDetach_r( int tid );
libc
These kernel calls detach the thread specified by tid. If tid is zero, the calling thread is used. Once detached, attempts to call ThreadJoin() on tid fail. When a detached thread terminates, its termination status is discarded and all its resources are released.
The ThreadDetach() and ThreadDetach_r() functions are identical, except in the way they indicate errors. See the Returns section for details.
These calls don't block.
The only difference between these functions is the way they indicate errors:
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
![]() |
![]() |
![]() |
![]() |