int
pthread_mutex_init(pthread_mutex_t * restrict mutex, const pthread_mutexattr_t * restrict attr)
)
function creates a new mutex, with attributes specified with
attr.
If
attr
is NULL the default attributes are used.
)
will return zero and put the new mutex id into
mutex,
otherwise an error number will be returned to indicate the error.
)
shall fail if:
EAGAIN]ENOMEM]
pthread_mutex_init()
may fail if:
EINVAL]attr
is invalid.
)
conforms to
ISO/IEC 9945-1:1996 (``POSIX.1'') .