next up previous contents index
Next: 18.3.34 pthread_mutex_destroy: Destroy a Up: 18.3 POSIX Threads Reference Previous: 18.3.32 pthread_getspecific: Set a

18.3.33 pthread_mutex_init: Initialize a mutex object

 

SYNOPSIS

#include <oskit/threads/pthread.h>

int pthread_mutex_init(pthread_mutex_t *m, pthread_mutexattr_t *attr);

DESCRIPTION

Initialize a mutex object, using the provided mutex attributes object. The attributes object may be a NULL pointer, in which case pthread_mutexattr_default is used.

PARAMETERS

mutex
A pointer to the mutex object.
attr
A pointer to the mutex attributes object.

RETURNS

Returns zero on success.

RELATED INFORMATION

pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_unlock



University of Utah Flux Research Group