B2BITS FIX Antenna HFT  1.0.13
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Attributes | Friends | List of all members
System::OldMutex Class Reference

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 >
 

Detailed Description

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.

Constructor & Destructor Documentation

System::OldMutex::OldMutex ( std::string const &  debugName = std::string())
explicit

Constructor.

System::OldMutex::~OldMutex ( )

Destructor.

Member Function Documentation

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.

Friends And Related Function Documentation

friend class Condition
friend
void onceMutexRoutine ( )
friend
friend class Utils::CTGuard< OldMutex >
friend

Member Data Documentation

pthread_mutexattr_t System::OldMutex::s_mutexAttr
static

Describes the attributes of a thread mutex.

It should be considered an opaque record, the names of the fields can change anytime.