#include <oskit/threads/pthread.h>int pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate);
Set the thread detach state in a previously initialized threads attribute object, for use with pthread_create.
- 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 zero on success. Returns EINVAL if detachstate is invalid.
pthread_create, pthread_attr_init