|
LRAUV
revA
|
A simple pthread Mutex abstraction. More...
#include <Mutex.h>
Public Member Functions | |
| Mutex () | |
| Constructor initializes the mutex. More... | |
| int | lock () |
| Lock the mutex. More... | |
| int | unlock () |
| Unlock the mutex. More... | |
| bool | tryLock () |
| Returns true if able to lock the mutex, false if already locked. More... | |
Private Attributes | |
| pthread_mutex_t | mutex_ |
| The Mutex itself. More... | |
Static Private Attributes | |
| static pthread_mutexattr_t | MutexAttr_ |
| static bool | MutexAttrInitialized_ |
Friends | |
| class | ThreadCondition |
A simple pthread Mutex abstraction.
| Mutex::Mutex | ( | ) |
Constructor initializes the mutex.
References mutex_, MutexAttr_, and MutexAttrInitialized_.
| int Mutex::lock | ( | ) |
Lock the mutex.
References mutex_.
Referenced by PCaller::containedWait(), CommandLine::DoCommand(), CommandLine::getLines(), LogEngine::lockProcessing(), LogWriter::lockWrites(), MutexLocker::MutexLocker(), PCaller::ownerWait(), PCaller::pCall(), NavChartDb::updateClosest(), NavChartDb::updateCurrent(), PCaller::yieldToContained(), and PCaller::yieldToOwner().
| bool Mutex::tryLock | ( | ) |
Returns true if able to lock the mutex, false if already locked.
Returns true if mutex if sucessfully locked. Otherwise return false.
References mutex_.
Referenced by MissionManager::run().
| int Mutex::unlock | ( | ) |
Unlock the mutex.
References mutex_.
Referenced by PCaller::containedWait(), CommandLine::DoCommand(), CommandLine::getLines(), PCaller::ownerWait(), PCaller::pCall(), MissionManager::run(), LogEngine::unlockProcessing(), LogWriter::unlockWrites(), NavChartDb::updateClosest(), NavChartDb::updateCurrent(), PCaller::yieldToContained(), PCaller::yieldToOwner(), and MutexLocker::~MutexLocker().
|
friend |
|
private |
The Mutex itself.
Referenced by lock(), Mutex(), ThreadCondition::timedWait(), tryLock(), unlock(), and ThreadCondition::wait().
|
staticprivate |
Referenced by Mutex().
|
staticprivate |
Referenced by Mutex().