4 #include "mutex_private.h"
5 #include "systemerror.h"
12 pthread_mutex_init(&priv->mutex, 0);
17 pthread_mutex_destroy(&priv->mutex);
23 if(int err = pthread_mutex_lock(&priv->mutex))
24 throw system_error("pthread_mutex_lock", err);
29 int err = pthread_mutex_trylock(&priv->mutex);
31 throw system_error("pthread_mutex_trylock", err);
37 if(int err = pthread_mutex_unlock(&priv->mutex))
38 throw system_error("pthread_mutex_unlock", err);