pthread_detach()

detach a thread 

Function


SYNOPSIS

#include <pthread.h>

int pthread_detach(pthread_t thread);


DESCRIPTION

The pthread_detach() function is used to indicate that storage for the specified thread can be reclaimed when the thread terminates. If thread has not terminated, pthread_detach() will not cause it to terminate. The effect of multiple pthread_detach() calls on the same target thread is unspecified.


PARAMETERS

thread 

Is the thread to mark as detached.


RETURN VALUES

On success, pthread_detach() returns 0. On error, one of the following values is returned:

EINVAL 

thread does not refer to a joinable thread.

ESRCH 

thread does not refer to any thread in the current process.


CONFORMANCE

POSIX P1003.1 (1996)


MULTITHREAD SAFETY LEVEL

MT-safe.


PORTING ISSUES

None.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
pthread_create(), pthread_join()


PTC MKS Toolkit 10.4 Documentation Build 39.