Index of Section 2 Manual Pages
| Interix / SUA | pthread_mutexattr_destroy.2 | Interix / SUA |
pthread_mutexattr_destroy(2) pthread_mutexattr_destroy(2)
pthread_mutexattr_destroy()
NAME
pthread_mutexattr_destroy(), pthread_mutexattr_init() - initialize or
destroy a mutex attributes object
SYNOPSIS
#include
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
DESCRIPTION
The pthread_mutexattr_init(2) function initializes the mutex attributes
object referenced by the attr argument with default values. This object
can be used in a call to pthread_mutex_init(2) to set the attributes of
the mutex when it is initialized.
The pthread_mutexattr_destroy(2) function destroys the mutex attributes
object referenced by the attr argument.
RETURN VALUES
On success, both functions return 0; otherwise, an error code is returned.
ERRORS
The pthread_mutexattr_destroy() function can fail for the following
reason:
[EINVAL]
The attr argument is invalid.
The pthread_mutexattr_init() function can fail for the following reason:
[ENOMEM]
Not enough free memory exists to initialize the mutex attributes
object.
Neither function returns [EINTR].
SEE ALSO
pthread_cond_destroy(2)
pthread_create(2)
pthread_mutex_destroy(2)
pthread_mutexattr_getpshared(2)
pthread_mutexattr_gettype(2)
USAGE NOTES
All of these functions are thread safe.
None of these functions are async-signal safe.