| PTHREAD_ATTR(3) | Library Functions Manual | PTHREAD_ATTR(3) |
pthread_attr_destroy,
pthread_attr_init — thread
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
pthread_create().
One attribute object can be used in multiple calls to
pthread_create(), with or without modifications
between calls.
The
pthread_attr_init()
function initializes attr with all the default thread
attributes.
The
pthread_attr_destroy()
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:
ENOMEM]pthread_attr_destroy() will fail if:
EINVAL]pthread_attr_init(),
pthread_attr_destroy() conform to
ISO/IEC 9945-1:1996 (“POSIX.1”)
| December 31, 2007 | Mac OS X 12 |