Logo ROOT   6.19/01
Reference Guide
List of all members | Public Member Functions | Private Attributes | List of all members
ROOT::TRWSpinLock Class Reference

Definition at line 22 of file TRWSpinLock.hxx.

Public Member Functions

 TRWSpinLock ()
 Regular constructor. More...
 
void ReadLock ()
 Acquire the lock in read mode. More...
 
void ReadUnLock ()
 Release the lock in read mode. More...
 
void WriteLock ()
 Acquire the lock in write mode. More...
 
void WriteUnLock ()
 Release the lock in write mode. More...
 

Private Attributes

std::condition_variable_any fCond
 ! RWlock internal condition variable More...
 
ROOT::TSpinMutex fMutex
 ! RWlock internal mutex More...
 
std::atomic< int > fReaderReservation
 ! A reader wants access More...
 
std::atomic< int > fReaders
 ! Number of readers More...
 
std::atomic< bool > fWriter
 ! Is there a writer? More...
 
std::atomic< int > fWriterReservation
 ! A writer wants access More...
 

#include <ROOT/TRWSpinLock.hxx>

Constructor & Destructor Documentation

◆ TRWSpinLock()

ROOT::TRWSpinLock::TRWSpinLock ( )
inline

Regular constructor.

Definition at line 34 of file TRWSpinLock.hxx.

Member Function Documentation

◆ ReadLock()

void TRWSpinLock::ReadLock ( )

Acquire the lock in read mode.

Definition at line 35 of file TRWSpinLock.cxx.

◆ ReadUnLock()

void TRWSpinLock::ReadUnLock ( )

Release the lock in read mode.

Definition at line 61 of file TRWSpinLock.cxx.

◆ WriteLock()

void TRWSpinLock::WriteLock ( )

Acquire the lock in write mode.

Definition at line 77 of file TRWSpinLock.cxx.

◆ WriteUnLock()

void TRWSpinLock::WriteUnLock ( )

Release the lock in write mode.

Definition at line 102 of file TRWSpinLock.cxx.

Member Data Documentation

◆ fCond

std::condition_variable_any ROOT::TRWSpinLock::fCond
private

! RWlock internal condition variable

Definition at line 29 of file TRWSpinLock.hxx.

◆ fMutex

ROOT::TSpinMutex ROOT::TRWSpinLock::fMutex
private

! RWlock internal mutex

Definition at line 28 of file TRWSpinLock.hxx.

◆ fReaderReservation

std::atomic<int> ROOT::TRWSpinLock::fReaderReservation
private

! A reader wants access

Definition at line 25 of file TRWSpinLock.hxx.

◆ fReaders

std::atomic<int> ROOT::TRWSpinLock::fReaders
private

! Number of readers

Definition at line 24 of file TRWSpinLock.hxx.

◆ fWriter

std::atomic<bool> ROOT::TRWSpinLock::fWriter
private

! Is there a writer?

Definition at line 27 of file TRWSpinLock.hxx.

◆ fWriterReservation

std::atomic<int> ROOT::TRWSpinLock::fWriterReservation
private

! A writer wants access

Definition at line 26 of file TRWSpinLock.hxx.


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