Logo ROOT  
Reference Guide
TVirtualMutex Class Referenceabstract

This class implements a mutex interface.

The actual work is done via TMutex which is available as soon as the thread library is loaded.

and

TLockGuard

This class provides mutex resource management in a guaranteed and exception safe way. Use like this:

{
TLockGuard guard(mutex);
... // do something
}

when guard goes out of scope the mutex is unlocked in the TLockGuard destructor. The exception mechanism takes care of calling the dtors of local objects so it is exception safe.

Definition at line 32 of file TVirtualMutex.h.

Public Member Functions

 TVirtualMutex (Bool_t=kFALSE)
 
virtual ~TVirtualMutex ()
 
Int_t Acquire ()
 
virtual Int_t CleanUp ()=0
 
virtual TVirtualMutexFactory (Bool_t=kFALSE)=0
 
virtual TClassIsA () const
 
virtual Int_t Lock ()=0
 
Int_t Release ()
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual Int_t TryLock ()=0
 
virtual Int_t UnLock ()=0
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 

#include <TVirtualMutex.h>

Inheritance diagram for TVirtualMutex:
[legend]

Constructor & Destructor Documentation

◆ TVirtualMutex()

TVirtualMutex::TVirtualMutex ( Bool_t  = kFALSE)
inline

Definition at line 35 of file TVirtualMutex.h.

◆ ~TVirtualMutex()

virtual TVirtualMutex::~TVirtualMutex ( )
inlinevirtual

Definition at line 36 of file TVirtualMutex.h.

Member Function Documentation

◆ Acquire()

Int_t TVirtualMutex::Acquire ( )
inline

Definition at line 42 of file TVirtualMutex.h.

◆ Class()

static TClass * TVirtualMutex::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TVirtualMutex::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static Version_t TVirtualMutex::Class_Version ( )
inlinestatic
Returns
Version of this class

Definition at line 47 of file TVirtualMutex.h.

◆ CleanUp()

virtual Int_t TVirtualMutex::CleanUp ( )
pure virtual

Implemented in ROOT::TVirtualRWMutex, and TMutex.

◆ DeclFileName()

static const char * TVirtualMutex::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 47 of file TVirtualMutex.h.

◆ Factory()

virtual TVirtualMutex * TVirtualMutex::Factory ( Bool_t  = kFALSE)
pure virtual

◆ IsA()

virtual TClass * TVirtualMutex::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented in ROOT::TVirtualRWMutex, TMutex, and ROOT::TRWMutexImp< MutexT, RecurseCountsT >.

Definition at line 47 of file TVirtualMutex.h.

◆ Lock()

virtual Int_t TVirtualMutex::Lock ( )
pure virtual

Implemented in ROOT::TVirtualRWMutex, and TMutex.

◆ Release()

Int_t TVirtualMutex::Release ( )
inline

Definition at line 43 of file TVirtualMutex.h.

◆ Streamer()

virtual void TVirtualMutex::Streamer ( TBuffer )
virtual

◆ StreamerNVirtual()

void TVirtualMutex::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 47 of file TVirtualMutex.h.

◆ TryLock()

virtual Int_t TVirtualMutex::TryLock ( )
pure virtual

Implemented in ROOT::TVirtualRWMutex, and TMutex.

◆ UnLock()

virtual Int_t TVirtualMutex::UnLock ( )
pure virtual

Implemented in ROOT::TVirtualRWMutex, and TMutex.


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