next up previous contents index
Next: 18.3.5 pthread_attr_setprio: Set the Up: 18.3 POSIX Threads Reference Previous: 18.3.3 pthread_attr_init: Initialize a

18.3.4 pthread_attr_setdetachstate: Set the detach state in a thread attributes object

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);

DESCRIPTION

Set the thread detach state in a previously initialized threads attribute object, for use with pthread_create.

PARAMETERS

attr
A pointer to the pthread_attr_t object representing the attributes for a thread creation.
detachstate
Either PTHREAD_CREATE_JOINABLE or PTHREAD_CREATE_DETACHED.

RETURNS

Returns zero on success. Returns EINVAL if detachstate is invalid.

RELATED INFORMATION

pthread_create, pthread_attr_init



University of Utah Flux Research Group