FRIBParallelanalysis
1.0
FrameworkforMPIParalleldataanalysisatFRIB
|
#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 |
Direct encapsulation of a pthread mutex.
CMutex::CMutex | ( | ) |
Construct the mutex with the default attributes:
CMutex::CMutex | ( | pthread_mutexattr_t & | attributes | ) |
Construct the mutex given a normal attributes block:
attributes | reference to the attributes block. |
CMutex::CMutex | ( | CMutexAttr & | attributes | ) |
Construct the mutex given an encapsulated attributes block.
attributes | - the CMutexAttr that encapsulates the attributes. |
|
virtual |
Destructor must detroy the mutex:
void CMutex::lock | ( | ) |
Lock the mutex, blocking if needed.
bool CMutex::trylock | ( | ) |
Attempt lock without blocking. Returns true on success.
void CMutex::unlock | ( | ) |
Unlock the mutex: