B2BITS FIX Antenna HFT
1.0.16
|
Mutex - provides synchronization, the ability to control how threads share resources. More...
#include <B2BITS_Mutex.h>
Public Member Functions | |
void | lock () |
Locks the mutex. More... | |
OldMutex (std::string const &debugName=std::string()) | |
Constructor. More... | |
bool | tryLock () |
void | unlock () |
Unlocks the mutex. More... | |
~OldMutex () | |
Destructor. More... | |
Static Public Attributes | |
static pthread_mutexattr_t | s_mutexAttr |
Describes the attributes of a thread mutex. More... | |
Friends | |
class | Condition |
void | onceMutexRoutine () |
class | Utils::CTGuard< OldMutex > |
Mutex - provides synchronization, the ability to control how threads share resources.
You use mutexes to prevent multiple threads from modifying shared data at the same time, and to ensure that a thread can read consistent values for a set of resources (for example, memory) that may be modified by other threads.
|
explicit |
Constructor.
System::OldMutex::~OldMutex | ( | ) |
Destructor.
void System::OldMutex::lock | ( | ) |
Locks the mutex.
If the mutex is currently locked, the calling thread is blocked until mutex is unlocked. On return, the thread owns the mutex until it calls Mutex::unlock().
bool System::OldMutex::tryLock | ( | ) |
void System::OldMutex::unlock | ( | ) |
Unlocks the mutex.
The mutex becomes unowned. If any threads are waiting for the mutex, one is awakened.
|
friend |
|
friend |
|
friend |
|
static |
Describes the attributes of a thread mutex.
It should be considered an opaque record, the names of the fields can change anytime.