next up previous contents index
Next: 18.3.36 pthread_mutex_trylock: Attempt to Up: 18.3 POSIX Threads Reference Previous: 18.3.34 pthread_mutex_destroy: Destroy a

18.3.35 pthread_mutex_lock: Lock a unlocked mutex object

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_mutex_lock(pthread_mutex_t *m);

DESCRIPTION

Lock a mutex object. If the mutex is currently locked, the thread waits (is suspended) for the mutex to become available.

PARAMETERS

mutex
A pointer to the mutex object.

RETURNS

Returns zero on success.

RELATED INFORMATION

pthread_mutex_init, pthread_mutex_unlock, pthread_mutex_trylock



University of Utah Flux Research Group