System::Mutex Class Reference

#include <B2BITS_Mutex.h>

List of all members.

Public Member Functions

 Mutex ()
virtual ~Mutex ()
void lock ()
bool tryLock ()
void unlock ()

Static Public Attributes

static pthread_mutexattr_t s_mutexAttr

Friends

class Condition
class Utils::CTGuard< Mutex >
void onceMutexRoutine ()


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::Mutex::Mutex (  ) 

Constructor.

virtual System::Mutex::~Mutex (  )  [virtual]

Destructor.


Member Function Documentation

void System::Mutex::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().

void System::Mutex::unlock (  ) 

Unlocks the mutex. The mutex becomes unowned. If any threads are waiting for the mutex, one is awakened.


Member Data Documentation

pthread_mutexattr_t System::Mutex::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.


The documentation for this class was generated from the following file:

Generated on Fri Apr 17 12:27:50 2009 for B2BITS FIX Antenna C++ by  doxygen 1.5.6