62 Mutex(
const char *
const name = 0)
64 ::pthread_mutex_init(&
mutex_, 0);
84 ::pthread_mutex_destroy(&
mutex_);
104 ::pthread_mutex_lock(&
mutex_);
124 return ::pthread_mutex_trylock(&
mutex_);
144 ::pthread_mutex_unlock(&
mutex_);
165 #endif // COIL_MUTEX_H Mutex class.
Definition: Mutex.h:40
void lock()
Mutual exclusion lock.
Definition: Mutex.h:102
~Mutex()
Destructor.
Definition: Mutex.h:82
void unlock()
Mutual exclusion unlock.
Definition: Mutex.h:142
bool trylock()
Mutual exclusion non-blocking lock.
Definition: Mutex.h:122
Mutex(const char *const name=0)
Constructor.
Definition: Mutex.h:62
pthread_mutex_t mutex_
Mutual exclusion object.
Definition: Mutex.h:158
Common Object Interface Layer.
Definition: Affinity.h:28