PTHREAD_MUTEXATTR_CREATE(3P) BSD PTHREAD_MUTEXATTR_CREATE(3P)
NAME
pthread_mutexattr_create - Creates a mutex attributes object
SYNOPSIS
#include <pthread.h>
int pthread_mutexattr_create (attr)
pthread_mutexattr_t *attr;
DESCRIPTION
The pthread_mutexattr_create function creates a mutex attributes object
initialized with the default values for the defined attributes, and
stores its ID in the attr argument. When you create a new mutex (with
the pthread_mutex_init(3P) function), you use an attributes object to
specify the attributes to be used for that mutex.
The attr Specifies the address in which the ID for the new mutex
attributes object will be stored.
No mutex attributes are currently defined.
NOTES
This interface is based on draft 4 of the IEEE P1003.4a standard, and
will be changed to conform to the final version.
DIAGNOSTICS
Upon successful completion, the ID of the created mutex attributes object
is stored in *attr, and a value of 0 (zero) is returned. Otherwise, -1
is returned and errno is set to indicate the error.
ERRORS
If the pthread_mutexattr_create function fails, errno may be set to one
of the following values:
[ENOMEM] There is not enough memory to create the mutex attributes
object. This is not a temporary condition.
[EINVAL] The value specified by the attr argument is invalid.
SEE ALSO
pthread_create(3P), pthread_mutex_init(3P), pthread_cond_init(3P)