HP-UX Reference (11i v1 05/09) - 3 Library Functions N-Z (vol 7)

p
pthread_mutex_lock(3T) pthread_mutex_lock(3T)
(Pthread Library)
[EINVAL] mutex is not an initialized mutex.
[EFAULT] mutex parameter points to an illegal address.
If any of the following occur, the
pthread_mutex_lock()
function returns the corresponding error
number:
[EDEADLK] The current thread already owns the mutex. This error will be detected only for
PTHREAD_MUTEX_ERRORCHECK
mutexes on HP-UX.
WARNINGS
A recursive mutex can be locked more than once by the same thread without causing that thread to
deadlock. Undefined behavior may result if the owner of a recursive mutex tries to lock the mutex too
many times.
AUTHOR
pthread_mutex_lock()
and pthread_mutex_trylock()
was derived from the IEEE POSIX
P1003.1c standard and X/Open
SEE ALSO
pthread_mutex_init(3T), pthread_mutex_destroy(3T), pthread_mutex_unlock(3T).
STANDARDS CONFORMANCE
pthread_mutex_lock()
: POSIX 1003.1c.
pthread_mutex_trylock()
: POSIX 1003.1c.
Section 3726 Hewlett-Packard Company 2 HP-UX 11i Version 1: September 2005