OpenThreads
|
This class provides an object-oriented thread mutex interface. More...
Public Types | |
enum | MutexType { MUTEX_NORMAL, MUTEX_RECURSIVE } |
Public Member Functions | |
Mutex (MutexType type=MUTEX_NORMAL) | |
Constructor. | |
virtual | ~Mutex () |
Destructor. | |
MutexType | getMutexType () const |
virtual int | lock () |
Lock the mutex. | |
virtual int | unlock () |
Unlock the mutex. | |
virtual int | trylock () |
Test if mutex can be locked. | |
Friends | |
class | Condition |
This class provides an object-oriented thread mutex interface.
OpenThreads::Mutex::Mutex | ( | MutexType | type = MUTEX_NORMAL | ) |
Constructor.
virtual OpenThreads::Mutex::~Mutex | ( | ) | [virtual] |
Destructor.
MutexType OpenThreads::Mutex::getMutexType | ( | ) | const [inline] |
virtual int OpenThreads::Mutex::lock | ( | ) | [virtual] |
Lock the mutex.
Referenced by OpenThreads::ReadWriteMutex::readLock(), and OpenThreads::ReadWriteMutex::writeLock().
virtual int OpenThreads::Mutex::trylock | ( | ) | [virtual] |
Test if mutex can be locked.
virtual int OpenThreads::Mutex::unlock | ( | ) | [virtual] |
Unlock the mutex.
Referenced by OpenThreads::ReadWriteMutex::readUnlock(), and OpenThreads::ReadWriteMutex::writeUnlock().
friend class Condition [friend] |
![]() | Generated at Fri Apr 27 2012 20:42:14 for the OpenThreads by doxygen 1.8.0. |