Definition at line 56 of file mutex.h.
OSB_LIB::Mutex::Mutex | ( | const pthread_mutexattr_t * | attr = 0 |
) |
Constructor with mutex attributes.
attr | Mutex attributes used for initalization of mutex_, see pthread_mutexattr_init for details. |
OSB_LIB::Mutex::~Mutex | ( | ) |
Destructor.
OSB_LIB::Mutex::Mutex | ( | const Mutex & | ) | [private] |
Prevent copying: not implemented.
int OSB_LIB::Mutex::lock | ( | ) |
Lock the mutex.
The function locks the mutex. It blocks until the the mutex is aquired.
Referenced by OSB_LIB::Shared< T >::lock().
int OSB_LIB::Mutex::trylock | ( | ) |
Try to lock the mutex.
The function tries to lock the mutex without waiting if already locked.
Referenced by OSB_LIB::Shared< T >::trylock().
int OSB_LIB::Mutex::unlock | ( | ) |
Unlock the mutex.
The funtion unlocks the mutex.
Referenced by OSB_LIB::Shared< T >::unlock().
pthread_mutex_t OSB_LIB::Mutex::mutex_ [private] |