wibble 0.1.28
|
pthread mutex wrapper; WARNING: the class allows copying and assignment, but this is not always safe. More...
#include <mutex.h>
Public Member Functions | |
Mutex (bool recursive=false) | |
Mutex (const Mutex &m) | |
~Mutex () | |
bool | trylock () |
void | lock () |
Lock the mutex Normally it's better to use MutexLock. | |
void | unlock () |
Unlock the mutex Normally it's better to use MutexLock. | |
void | reinit () |
Reinitialize the mutex. | |
Friends | |
class | Condition |
pthread mutex wrapper; WARNING: the class allows copying and assignment, but this is not always safe.
You should never copy a locked mutex. It is however safe to copy when there is no chance of any of the running threads using the mutex.
wibble::sys::Mutex::Mutex | ( | bool | recursive = false | ) | [inline] |
wibble::sys::Mutex::Mutex | ( | const Mutex & | m | ) | [inline] |
wibble::sys::Mutex::~Mutex | ( | ) | [inline] |
void wibble::sys::Mutex::lock | ( | ) | [inline] |
Lock the mutex Normally it's better to use MutexLock.
Referenced by wibble::sys::MutexLockT< Mutex >::MutexLockT(), and wibble::sys::MutexLockT< Mutex >::reclaim().
void wibble::sys::Mutex::reinit | ( | ) | [inline] |
Reinitialize the mutex.
bool wibble::sys::Mutex::trylock | ( | ) | [inline] |
void wibble::sys::Mutex::unlock | ( | ) | [inline] |
Unlock the mutex Normally it's better to use MutexLock.
Referenced by wibble::sys::MutexLockT< Mutex >::drop(), and wibble::sys::MutexLockT< Mutex >::~MutexLockT().
friend class Condition [friend] |