9 #include "pthread/mutex.hpp"
14 auto rc = pthread_mutex_init (&
_mutex, NULL);
16 throw mutex_exception (
"In constructor of mutex pthread_mutex_init(&mutex, NULL) failed. ", rc );
21 pthread_mutex_destroy (&
_mutex);
26 rc = pthread_mutex_lock ( &
_mutex );
34 auto rc = pthread_mutex_trylock ( &
_mutex );
36 throw mutex_exception(
"pthread_mutex_trylock failed, already locked.", rc);
41 auto rc = pthread_mutex_unlock ( &
_mutex );