Logo ROOT  
Reference Guide
 
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Loading...
Searching...
No Matches
TMutex Class Reference

Definition at line 30 of file TMutex.h.

Public Member Functions

 TMutex (Bool_t recursive=kFALSE)
 Create a mutex lock.
 
virtual ~TMutex ()
 
Int_t CleanUp () override
 Clean up of mutex.
 
TVirtualMutexFactory (Bool_t recursive=kFALSE) override
 Create mutex and return pointer to it.
 
TClassIsA () const override
 
void lock ()
 
Int_t Lock () override
 Lock the mutex.
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
Int_t TryLock () override
 Try to lock mutex.
 
void unlock ()
 
Int_t UnLock () override
 Unlock the mutex.
 
- Public Member Functions inherited from TVirtualMutex
 TVirtualMutex (Bool_t=kFALSE)
 
virtual ~TVirtualMutex ()
 
Int_t Acquire ()
 
Int_t Release ()
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TVirtualMutex
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Private Member Functions

 TMutex (const TMutex &)=delete
 
TMutexoperator= (const TMutex &)=delete
 

Private Attributes

TMutexImpfMutexImp
 

Friends

class TCondition
 
class TThread
 

#include <TMutex.h>

Inheritance diagram for TMutex:
[legend]

Constructor & Destructor Documentation

◆ TMutex() [1/2]

TMutex::TMutex ( const TMutex & )
privatedelete

◆ TMutex() [2/2]

TMutex::TMutex ( Bool_t recursive = kFALSE)

Create a mutex lock.

The actual mutex implementation will be provided via the TThreadFactory.

Definition at line 34 of file TMutex.cxx.

◆ ~TMutex()

virtual TMutex::~TMutex ( )
inlinevirtual

Definition at line 43 of file TMutex.h.

Member Function Documentation

◆ Class()

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

◆ Class_Name()

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

◆ Class_Version()

static constexpr Version_t TMutex::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 56 of file TMutex.h.

◆ CleanUp()

Int_t TMutex::CleanUp ( )
overridevirtual

Clean up of mutex.

Implements TVirtualMutex.

Definition at line 76 of file TMutex.cxx.

◆ DeclFileName()

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

Definition at line 56 of file TMutex.h.

◆ Factory()

TVirtualMutex * TMutex::Factory ( Bool_t recursive = kFALSE)
overridevirtual

Create mutex and return pointer to it.

Calling function must care about proper deletion. The function is intended to be used in connection with the R__LOCKGUARD2 macro for local thread protection. Since "new" is used the TStorage class has to be protected by gGlobalMutex.

Implements TVirtualMutex.

Definition at line 87 of file TMutex.cxx.

◆ IsA()

TClass * TMutex::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from TVirtualMutex.

Definition at line 56 of file TMutex.h.

◆ lock()

void TMutex::lock ( )
inline

Definition at line 51 of file TMutex.h.

◆ Lock()

Int_t TMutex::Lock ( )
overridevirtual

Lock the mutex.

Returns 0 when no error, EDEADLK when mutex was already locked by this thread and this mutex is not reentrant.

Implements TVirtualMutex.

Definition at line 46 of file TMutex.cxx.

◆ operator=()

TMutex & TMutex::operator= ( const TMutex & )
privatedelete

◆ Streamer()

void TMutex::Streamer ( TBuffer & )
overridevirtual

Reimplemented from TVirtualMutex.

◆ StreamerNVirtual()

void TMutex::StreamerNVirtual ( TBuffer & ClassDef_StreamerNVirtual_b)
inline

Definition at line 56 of file TMutex.h.

◆ TryLock()

Int_t TMutex::TryLock ( )
overridevirtual

Try to lock mutex.

Returns 0 when no error, EDEADLK when mutex was already locked by this thread and this mutex is not reentrant.

Implements TVirtualMutex.

Definition at line 57 of file TMutex.cxx.

◆ unlock()

void TMutex::unlock ( )
inline

Definition at line 52 of file TMutex.h.

◆ UnLock()

Int_t TMutex::UnLock ( )
overridevirtual

Unlock the mutex.

Returns 0 when no error, EPERM when mutex was already unlocked by this thread.

Implements TVirtualMutex.

Definition at line 68 of file TMutex.cxx.

Friends And Related Symbol Documentation

◆ TCondition

friend class TCondition
friend

Definition at line 32 of file TMutex.h.

◆ TThread

friend class TThread
friend

Definition at line 33 of file TMutex.h.

Member Data Documentation

◆ fMutexImp

TMutexImp* TMutex::fMutexImp
private

Definition at line 36 of file TMutex.h.

Libraries for TMutex:

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