OAR

RTEMS 4.5.1-pre3 On-Line Library


Thread Manager pthread_attr_setdetachstate - Set Detach State

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

17.4.3: pthread_attr_setdetachstate - Set Detach State

CALLING SEQUENCE:

#include <pthread.h>

int pthread_attr_setdetachstate(
  pthread_attr_t *attr,
  int             detachstate
);

STATUS CODES:

EINVAL
The attribute pointer argument is invalid.
EINVAL
The attribute set is not initialized.
EINVAL
The detachstate argument is invalid.

DESCRIPTION:

The pthread_attr_setdetachstate routine is used to value of the detachstate attribute. This attribute controls whether the thread is created in a detached state.

The detachstate can be either PTHREAD_CREATE_DETACHED or PTHREAD_CREATE_JOINABLE. The default value for all threads is PTHREAD_CREATE_JOINABLE.

NOTES:

If a thread is in a detached state, then the use of the ID with the pthread_detach or pthread_join routines is an error.


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2000 OAR Corporation