|
My Project
|
Public Member Functions | |
| Mutex () | |
| virtual | ~Mutex () |
| void | lock () |
| void | unlock () |
| bool | tryLock () |
| bool | isLocked () |
| pthread_mutex_t | getPthreadVar () |
| pthread_mutex_t * | getPthreadVarPtr () |
| bool | isItMe () |
| Mutex::Mutex | ( | ) |
Constructor.
....................................................................... Constructor.
|
virtual |
Destructor.
....................................................................... Destructor.
| bool Mutex::isItMe | ( | ) |
....................................................................... Return true if the calling thread is the one already locking this mutex.
| bool Mutex::isLocked | ( | ) |
Somewhat redundant with tryLock(), except that the mutex is unlocked on exit. Used for checking if someone else has locked a mutex without actually wanting to lock it ourselves.
....................................................................... Return true if the mutex is locked.
| void Mutex::lock | ( | ) |
....................................................................... Lock the mutex.
| bool Mutex::tryLock | ( | ) |
Return true if the mutex was successfully locked by this call.
....................................................................... Get a lock if the mutex is available. Return true if the lock was successful
| void Mutex::unlock | ( | ) |
....................................................................... Unlock the mutex.