#include <ulxr_mutex.h>
Public Member Functions | |
Mutex () | |
Creates the mutex object. | |
~Mutex () throw () | |
Destructs mutex object. | |
void | lock () |
Waits for the mutex to become available. | |
void | unlock () |
Releases the mutex. | |
bool | tryLock () |
Tries to request the mutex. | |
Private Attributes | |
pthread_mutex_t | handle |
Classes | |
class | Locker |
Helper class to request and release a mutex by pure presence. More... | |
class | TryLocker |
Helper class to request and release a mutex by pure presence. More... |
Definition at line 49 of file ulxr_mutex.h.
ulxr::Mutex::Mutex | ( | ) |
Creates the mutex object.
Definition at line 46 of file ulxr_mutex.cpp.
References handle, ulxr::SystemError, ulxr_i18n, and ULXR_PCHAR.
ulxr::Mutex::~Mutex | ( | ) | throw () |
void ulxr::Mutex::lock | ( | ) |
Waits for the mutex to become available.
Definition at line 67 of file ulxr_mutex.cpp.
References ulxr::SystemError, ulxr_i18n, and ULXR_PCHAR.
Referenced by ulxr::Mutex::Locker::Locker().
void ulxr::Mutex::unlock | ( | ) |
Releases the mutex.
Definition at line 78 of file ulxr_mutex.cpp.
References ulxr::SystemError, ulxr_i18n, and ULXR_PCHAR.
Referenced by ulxr::Mutex::Locker::~Locker(), and ulxr::Mutex::TryLocker::~TryLocker().
bool ulxr::Mutex::tryLock | ( | ) |
Tries to request the mutex.
Definition at line 89 of file ulxr_mutex.cpp.
Referenced by ulxr::Mutex::TryLocker::TryLocker().
pthread_mutex_t ulxr::Mutex::handle [private] |