GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
TGo4LockGuard Class Reference

#include <TGo4LockGuard.h>

Public Member Functions

 TGo4LockGuard (TMutex *mutex=0, Bool_t=kFALSE)
 
virtual ~TGo4LockGuard ()
 
 TGo4LockGuard ()
 
 TGo4LockGuard (int i, bool force=false)
 

Static Public Member Functions

static void LockMainMutex ()
 
static void UnLockMainMutex ()
 
static Int_t MainMutexLockCount ()
 

Private Attributes

TMutex * fxMutex
 
Bool_t fbIsLocked
 
Bool_t fbIsMainMutex
 
int dummy
 

Static Private Attributes

static TMutex * fgxMainMutex = 0
 
static Int_t fgiLockCount = 0
 

Detailed Description

Definition at line 40 of file TGo4LockGuard.h.

Constructor & Destructor Documentation

TGo4LockGuard::TGo4LockGuard ( TMutex *  mutex = 0,
Bool_t  = kFALSE 
)

Definition at line 23 of file TGo4LockGuard.cxx.

References fbIsLocked, fbIsMainMutex, fgiLockCount, fgxMainMutex, and fxMutex.

TGo4LockGuard::~TGo4LockGuard ( )
virtual

Definition at line 45 of file TGo4LockGuard.cxx.

References fbIsLocked, fbIsMainMutex, fgiLockCount, and fxMutex.

TGo4LockGuard::TGo4LockGuard ( )
inline

Definition at line 24 of file TGo4LockGuard.h.

TGo4LockGuard::TGo4LockGuard ( int  i,
bool  force = false 
)
inline

Definition at line 25 of file TGo4LockGuard.h.

Member Function Documentation

void TGo4LockGuard::LockMainMutex ( )
static

Definition at line 58 of file TGo4LockGuard.cxx.

References fgxMainMutex.

Int_t TGo4LockGuard::MainMutexLockCount ( )
static

Definition at line 53 of file TGo4LockGuard.cxx.

References fgiLockCount.

void TGo4LockGuard::UnLockMainMutex ( )
static

Definition at line 63 of file TGo4LockGuard.cxx.

References fgxMainMutex.

Member Data Documentation

int TGo4LockGuard::dummy
private

Definition at line 25 of file TGo4LockGuard.h.

Bool_t TGo4LockGuard::fbIsLocked
private

We need this flag if first TThread starts in between ctor and dtor.

Definition at line 59 of file TGo4LockGuard.h.

Referenced by TGo4LockGuard(), and ~TGo4LockGuard().

Bool_t TGo4LockGuard::fbIsMainMutex
private

True if the mutex of this lockguard instance is the global go4 main mutex.

Definition at line 63 of file TGo4LockGuard.h.

Referenced by TGo4LockGuard(), and ~TGo4LockGuard().

Int_t TGo4LockGuard::fgiLockCount = 0
staticprivate

Counts the numbers of locks of the recursive main mutex.

Definition at line 72 of file TGo4LockGuard.h.

Referenced by MainMutexLockCount(), TGo4LockGuard(), and ~TGo4LockGuard().

TMutex * TGo4LockGuard::fgxMainMutex = 0
staticprivate

Main Mutex of the go4 system. Used to protect any memory critical operations. This mutex is applied if lockguard is called without giving external mutex.

Definition at line 69 of file TGo4LockGuard.h.

Referenced by LockMainMutex(), TGo4LockGuard(), and UnLockMainMutex().

TMutex* TGo4LockGuard::fxMutex
private

Reference to Mutex associated with this lockguard (external or internal)

Definition at line 56 of file TGo4LockGuard.h.

Referenced by TGo4LockGuard(), and ~TGo4LockGuard().


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