#include <mutex.h>
Public Member Functions | |
Mutex () | |
~Mutex () | |
int | lock () |
Lock the mutex. | |
int | unlock () |
Unock the mutex. | |
bool | tryLock () |
Try to lock mutex. | |
bool | isLocked () |
Check if mutex is already locked. | |
Protected Attributes | |
pthread_mutex_t | m_mutex |
Not much to say. lock and unlock to synchronize your threads.
Definition at line 29 of file mutex.h.
|
Definition at line 23 of file mutex.cpp. References m_mutex. |
|
|
|
Check if mutex is already locked.
Definition at line 47 of file mutex.cpp. References m_mutex. |
|
Lock the mutex.
Definition at line 32 of file mutex.cpp. References m_mutex. Referenced by MutexLocker::MutexLocker(), VC820::run(), PeakTech10Ascii::run(), M9803R::run(), GDM703::setAscii(), and MetexAscii::setMetexAscii(). |
|
Try to lock mutex. If it is already locked function returns false.
Definition at line 42 of file mutex.cpp. References m_mutex. |
|
Unock the mutex.
Definition at line 37 of file mutex.cpp. References m_mutex. Referenced by VC820::run(), PeakTech10Ascii::run(), M9803R::run(), GDM703::setAscii(), MetexAscii::setMetexAscii(), and MutexLocker::~MutexLocker(). |
|
Definition at line 58 of file mutex.h. Referenced by isLocked(), lock(), Mutex(), tryLock(), and unlock(). |