[Previous] [Contents] [Next]

pthread_detach()

Detach thread

Synopsis:

#include <pthread.h>

int pthread_detach( pthread_t thread );

Library:

libc

Description:

The pthread_detach() function detaches thread thread. When a detached thread terminates, all system resources allocated to that thread are immediately reclaimed.

Returns:

EOK
Success.
EINVAL
The thread thread is already detached.
ESRCH
The thread thread doesn't exist.

Classification:

POSIX 1003.1 (Threads)

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_join(), ThreadDetach().


[Previous] [Contents] [Next]