int
pthread_attr_init(pthread_attr_t *attr)
int
pthread_attr_destroy(pthread_attr_t *attr)
int
pthread_attr_setdetachstate(pthread_attr_t *attr, int detachstate)
int
pthread_attr_getdetachstate(const pthread_attr_t *attr, int *detachstate)
int
pthread_attr_setschedparam(pthread_attr_t * restrict attr, const struct sched_param * restrict param)
int
pthread_attr_getschedparam(const pthread_attr_t * restrict attr, struct sched_param * restrict param)
).
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.
The
pthread_attr_set*()
functions set the attribute that corresponds to each function name.
The
pthread_attr_get*()
functions copy the value of the attribute that corresponds to each function name
to the location pointed to by the second function parameter.
The attribute parameters for the
pthread_attr_setdetachstate()
and
pthread_attr_getdetachstate()
are mutually exclusive and must be one of:
PTHREAD_CREATE_JOINABLE)
function once they exit for their status to be received and their resources
to be freed.
This is the default.
PTHREAD_CREATE_DETACHED)
shall fail if:
ENOMEM]
pthread_attr_destroy()
may fail if:
EINVAL]attr
is invalid.
pthread_attr_setdetachstate()
shall fail if:
EINVAL]detachstate
is invalid.
pthread_attr_setschedparam()
may fail if:
EINVAL]attr
is invalid.
ENOTSUP]param
is invalid.
),
pthread_attr_destroy(),
pthread_attr_setdetachstate(),
pthread_attr_getdetachstate(),
pthread_attr_setschedparam(),
and
pthread_attr_getschedparam()
conform to
ISO/IEC 9945-1:1996 (``POSIX.1'') .