The pthread_mutex_lock function

Name

pthread_mutex_lock -- 

Synopsis

#include <pthread.h>

int pthread_mutex_lock (pthread_mutex_t *mutex);

Description

The pthread_mutex_lock function locks the given mutex. If the mutex is already locked, then the calling thread blocks until the thread that currently holds the mutex unlocks it.

Returns

The pthread_mutex_lock function returns zero if the call is successful, otherwise it sets errno to EINVAL and returns -1.

Implementation Notes

None