pthread_mutexattr_init(3P)pthread_mutexattr_init(3P)NAME
pthread_mutexattr_init, pthread_mutexattr_destroy - initialize/destroy a
mutex attribute object
C SYNOPSIS
#include <pthread.h>
int pthread_mutexattr_init(pthread_mutexattr_t *attr);
int pthread_mutexattr_destroy(pthread_mutexattr_t *attr);
DESCRIPTION
The function pthread_mutexattr_init() initializes the mutex attribute
object referenced by attr to the default attribute values. The default
sharing value is PTHREAD_PROCESS_PRIVATE. The default priority protocol
is PTHREAD_PRIO_NONE. The default mutex type is PTHREAD_MUTEX_DEFAULT.
Once a mutex attribute object is used to initialize one or more mutexes,
any function that affects the attribute object will not affect the
previously initialized mutexes. pthread_mutexattr_destroy()
uninitializes the mutex attribute structure referenced by attr.
DIAGNOSTICS
These functions return zero.
SEE ALSOpthread_mutex_lock(3P), pthread_mutexattr_setprioceiling(3P),
pthread_mutexattr_setpshared(3P), pthread_mutexattr_setprotocol(3P),
pthread_mutexattr_settype(3P).
Page 1