Middleware, development tools, realtime operating system
software and services for superior embedded design


Home
QNX Community Resources
Developer Support
QNX Documentation Library
QNX Developer Support

QNX Developer Support

QNX Software Systems
Developer Resources
Blogs
Board support packages
Foundry27 projects
Forums
Hardware support listing
Online video tutorials
Product documentation
Technical Articles

[Previous] [Contents] [Index] [Next]

pthread_detach()

Detach a thread from a process

Synopsis:

#include <pthread.h>

int pthread_detach( pthread_t thread );

Arguments:

thread
The ID of the thread that you want to detach, which you can get when you call pthread_create() or pthread_self().

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

The pthread_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.

Returns:

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

Classification:

POSIX 1003.1 THR

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

See also:

pthread_join(), ThreadDetach().


[Previous] [Contents] [Index] [Next]