| Yate
    | 
#include <yateclass.h>
 
  
| Public Member Functions | |
| Mutex (bool recursive=false, const char *name=0) | |
| Mutex (const Mutex &original) | |
| ~Mutex () | |
| Mutex & | operator= (const Mutex &original) | 
| virtual bool | lock (long maxwait=-1) | 
| virtual bool | unlock () | 
| virtual bool | locked () const | 
| const char * | owner () const | 
| bool | recursive () const | 
| virtual Mutex * | lockableMutex () | 
|  Public Member Functions inherited from Lockable | |
| virtual | ~Lockable () | 
| virtual bool | check (long maxwait=-1) | 
| virtual bool | unlockAll () | 
| virtual Semaphore * | lockableSemaphore () | 
| virtual RWLock * | lockableRWLock () | 
| Static Public Member Functions | |
| static int | count () | 
| static int | locks () | 
| static bool | efficientTimedLock () | 
|  Static Public Member Functions inherited from Lockable | |
| static void | wait (unsigned long maxwait) | 
| static unsigned long | wait () | 
| static void | startUsingNow () | 
| static void | enableSafety (bool safe=true) | 
| static bool | safety () | 
| Friends | |
| class | MutexPrivate | 
Mutex support.
A simple mutual exclusion for locking access between threads
| 
 | explicit | 
Construct a new unlocked mutex
| recursive | True if the mutex has to be recursive (reentrant), false for a normal fast mutex | 
| name | Static name of the mutex (for debugging purpose only) | 
Copy constructor, creates a shared mutex
| original | Reference of the mutex to share | 
| ~Mutex | ( | ) | 
Destroy the mutex
| 
 | static | 
Get the number of mutexes counting the shared ones only once
| 
 | static | 
Check if a timed lock() is efficient on this platform
| 
 | virtual | 
| 
 | inlinevirtual | 
| 
 | virtual | 
Check if the mutex is currently locked - as it's asynchronous it guarantees nothing if other thread changes the mutex's status
Implements Lockable.
| 
 | static | 
Get the number of currently locked mutexes
Assignment operator makes the mutex shared with the original
| original | Reference of the mutex to share | 
| const char * owner | ( | ) | const | 
| bool recursive | ( | ) | const | 
Check if this mutex is recursive or not
| 
 | virtual | 
Unlock the mutex, does never wait
Implements Lockable.