Index of Section 2 Manual Pages
| Interix / SUA | pthread_attr_destroy.2 | Interix / SUA |
pthread_attr_destroy(2) pthread_attr_destroy(2)
pthread_attr_destroy()
NAME
pthread_attr_destroy(), pthread_attr_init() - initialize or destroy a
thread attributes object
SYNOPSIS
#include
int pthread_attr_destroy(pthread_attr_t *attr)
int pthread_attr_init(pthread_attr_t *attr);
DESCRIPTION
The pthread_attr_init(2) function initializes the thread attributes object
referenced by attr with default values. This object is supplied to the
pthread_create(2) function to specify the attributes of the thread when it
is created. The same thread attributes object can be used in multiple
calls to pthread_create().
The pthread_attr_destroy() function destroys a thread attributes object.
After the attributes have been set in the thread attributes object
referenced by attr, the pthread_create(2) function can be called to create
a new thread with the specified attributes. This function does not affect
the current running thread.
RETURN VALUES
On success, both functions return 0; otherwise, they return an error
number.
ERRORS
The pthread_attr_init() function can fail for this reason:
[ENOMEM]
Not enough memory to initialize the thread attributes object.
This function does not return [EINTR].
SEE ALSO
pthread_attr_getdetachstate(2)
pthread_attr_getguardsize(2)
pthread_attr_getinheritsched(2)
pthread_attr_getschedparam(2)
pthread_attr_getschedpolicy(2)
pthread_attr_getscope(2)
pthread_attr_getstack(2)
pthread_attr_getstackaddr(2)
pthread_attr_getstacksize(2)
pthread_create(2)
USAGE NOTES
All of these functions are thread safe.
None of these functions are async-signal safe.