A lightweight reentrant mutex. More...
#include "lightReMutex.h"
Public Member Functions | |
LightReMutex (const char *name) | |
LightReMutex (const std::string &name) | |
LightReMutex (const LightReMutex ©)=delete | |
LightReMutex & | operator= (const LightReMutex ©)=delete |
Public Member Functions inherited from LightReMutexDirect | |
void | acquire () const |
Grabs the lightReMutex if it is available. More... | |
void | acquire (Thread *current_thread) const |
This variant on acquire() accepts the current thread as a parameter, if it is already known, as an optimization. More... | |
void | clear_name () |
The mutex name is only defined when compiling in DEBUG_THREADS mode. More... | |
bool | debug_is_locked () const |
Returns true if the current thread has locked the LightReMutex, false otherwise. More... | |
void | elevate_lock () const |
This method increments the lock count, assuming the calling thread already holds the lock. More... | |
std::string | get_name () const |
The mutex name is only defined when compiling in DEBUG_THREADS mode. More... | |
bool | has_name () const |
The mutex name is only defined when compiling in DEBUG_THREADS mode. More... | |
void | lock () |
Alias for acquire() to match C++11 semantics. More... | |
void | output (std::ostream &out) const |
This method is declared virtual in MutexDebug, but non-virtual in LightReMutexDirect. More... | |
void | release () const |
Releases the lightReMutex. More... | |
void | set_name (const std::string &name) |
The mutex name is only defined when compiling in DEBUG_THREADS mode. More... | |
bool | try_lock () |
Alias for try_acquire() to match C++11 semantics. More... | |
void | unlock () |
Alias for release() to match C++11 semantics. More... | |
A lightweight reentrant mutex.
See LightMutex and ReMutex.
This class inherits its implementation either from MutexDebug or LightReMutexDirect, depending on the definition of DEBUG_THREADS.
Definition at line 30 of file lightReMutex.h.