FRIBParallelanalysis  1.0
FrameworkforMPIParalleldataanalysisatFRIB
Public Member Functions | Public Attributes | List of all members
CMutex Class Reference

#include <CTCLMutex.h>

Public Member Functions

 CMutex ()
 
 CMutex (pthread_mutexattr_t &attributes)
 
 CMutex (CMutexAttr &attributes)
 
virtual ~CMutex ()
 
void lock ()
 
bool trylock ()
 
void unlock ()
 

Public Attributes

pthread_mutex_t m_mutex
 

Detailed Description

Direct encapsulation of a pthread mutex.

Constructor & Destructor Documentation

◆ CMutex() [1/3]

CMutex::CMutex ( )

Construct the mutex with the default attributes:

◆ CMutex() [2/3]

CMutex::CMutex ( pthread_mutexattr_t &  attributes)

Construct the mutex given a normal attributes block:

Parameters
attributesreference to the attributes block.

◆ CMutex() [3/3]

CMutex::CMutex ( CMutexAttr attributes)

Construct the mutex given an encapsulated attributes block.

Parameters
attributes- the CMutexAttr that encapsulates the attributes.

◆ ~CMutex()

CMutex::~CMutex ( )
virtual

Destructor must detroy the mutex:

Member Function Documentation

◆ lock()

void CMutex::lock ( )

Lock the mutex, blocking if needed.

◆ trylock()

bool CMutex::trylock ( )

Attempt lock without blocking. Returns true on success.

◆ unlock()

void CMutex::unlock ( )

Unlock the mutex:


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