PTHREAD_ATTR(3) Library Functions Manual PTHREAD_ATTR(3)

pthread_attr_destroy, pthread_attr_initthread attribute operations

#include <pthread.h>

int
pthread_attr_destroy(pthread_attr_t *attr);

int
pthread_attr_init(pthread_attr_t *attr);

Thread attributes are used to specify parameters to (). One attribute object can be used in multiple calls to pthread_create(), with or without modifications between calls.

The () function initializes attr with all the default thread attributes.

The () function destroys attr.

If successful, these functions return 0. Otherwise, an error number is returned to indicate the error.

pthread_attr_init() will fail if:

[]
Out of memory.

pthread_attr_destroy() will fail if:

[]
Invalid value for attr.

pthread_create(3)

pthread_attr_init(), pthread_attr_destroy() conform to ISO/IEC 9945-1:1996 (“POSIX.1”)

December 31, 2007 Mac OS X 12