Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
ROOT::TRWSpinLock Class Reference

Definition at line 22 of file TRWSpinLock.hxx.

Public Member Functions

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

Private Attributes

std::condition_variable_any fCond
 ! RWlock internal condition variable
 
ROOT::TSpinMutex fMutex
 ! RWlock internal mutex
 
std::atomic< intfReaderReservation
 ! A reader wants access
 
std::atomic< intfReaders
 ! Number of readers
 
std::atomic< boolfWriter
 ! Is there a writer?
 
std::atomic< intfWriterReservation
 ! A writer wants access
 

#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.

Libraries for ROOT::TRWSpinLock:

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