Интерактивная система просмотра системных руководств (man-ов)
pthread_mutex_lock (3)
pthread_mutex_lock (3) ( Solaris man: Библиотечные вызовы )>> pthread_mutex_lock (3) ( FreeBSD man: Библиотечные вызовы ) pthread_mutex_lock (3) ( POSIX man: Библиотечные вызовы )
BSD mandoc
NAME
pthread_mutex_lock
- lock a mutex
LIBRARY
Lb libpthread
SYNOPSIS
#include <pthread.h>
int
pthread_mutex_lock (pthread_mutex_t *mutex);
DESCRIPTION
The
pthread_mutex_lock ();
function locks
Fa mutex .
If the mutex is already locked, the calling thread will block until the
mutex becomes available.
RETURN VALUES
If successful,
pthread_mutex_lock ();
will return zero, otherwise an error number will be returned to
indicate the error.
ERRORS
The
pthread_mutex_lock ();
function will fail if:
- Bq Er EINVAL
-
The value specified by
Fa mutex
is invalid.
- Bq Er EDEADLK
-
A deadlock would occur if the thread blocked waiting for
Fa mutex .
SEE ALSO
pthread_mutex_destroy3,
pthread_mutex_init3,
pthread_mutex_trylock3,
pthread_mutex_unlock3
STANDARDS
The
pthread_mutex_lock ();
function conforms to
St -p1003.1-96 .
Index
- NAME
-
- LIBRARY
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- SEE ALSO
-
- STANDARDS
-