HP-UX Reference (11i v2 03/08) - 3 Library Functions N-Z (vol 7)
p
pthread_mutex_init(3T) pthread_mutex_init(3T)
(Pthread Library)
[EINVAL] The value specified by mutex or attr is invalid.
[EBUSY] mutex is an already initialized mutex.
[EFAULT] mutex parameter points to an illegal address.
For each of the following conditions, if the condition is detected, the
pthread_mutex_destroy()
function returns the corresponding error number:
[EINVAL] mutex is not a valid mutex.
[EBUSY] mutex is currently locked or in use by another thread.
WARNINGS
The space for the mutex must be allocated before calling
pthread_mutex_init()
. Undefined
behavior will result if the process-shared attribute of attr is
PTHREAD_PROCESS_SHARED
and the space
allocated for the mutex is not accessible to cooperating threads.
AUTHOR
pthread_mutex_init()
and pthread_mutex_destroy()
were derived from the IEEE POSIX
P1003.1c standard.
SEE ALSO
pthread_mutex_lock(3T), pthread_mutex_unlock(3T), pthread_mutex_trylock(3T).
STANDARDS CONFORMANCE
pthread_mutex_init()
: POSIX 1003.1c.
pthread_mutex_destroy()
: POSIX 1003.1c.
HP-UX 11i Version 2: August 2003 − 2 − Hewlett-Packard Company Section 3−−793