Definition at line 278 of file TReentrantRWLock.hxx.
Public Types | |
using | State = TVirtualRWMutex::State |
using | StateDelta = TVirtualRWMutex::StateDelta |
Public Member Functions | |
TReentrantRWLock () | |
Regular constructor. | |
void | Apply (std::unique_ptr< StateDelta > &&delta) |
Re-apply a delta. | |
std::unique_ptr< State > | GetStateBefore () |
Get the lock state before the most recent write lock was taken. | |
TVirtualRWMutex::Hint_t * | ReadLock () |
Acquire the lock in read mode. | |
void | ReadUnLock (TVirtualRWMutex::Hint_t *) |
Release the lock in read mode. | |
std::unique_ptr< StateDelta > | Rewind (const State &earlierState) |
Rewind to an earlier mutex state, returning the delta. | |
TVirtualRWMutex::Hint_t * | WriteLock () |
Acquire the lock in write mode. | |
void | WriteUnLock (TVirtualRWMutex::Hint_t *) |
Release the lock in write mode. | |
Private Member Functions | |
void | AssertReadCountLocIsFromCurrentThread (const size_t *presumedLocalReadersCount) |
Assert that presumedLocalReadersCount really matches the local read count. | |
Private Attributes | |
std::condition_variable_any | fCond |
! RWlock internal condition variable | |
MutexT | fMutex |
! RWlock internal mutex | |
std::atomic< int > | fReaderReservation |
! A reader wants access | |
std::atomic< int > | fReaders |
! Number of readers | |
RecurseCountsT | fRecurseCounts |
! Trackers for re-entry in the lock by the same thread. | |
std::atomic< bool > | fWriter |
! Is there a writer? | |
std::atomic< int > | fWriterReservation |
! A writer wants access | |
using ROOT::TReentrantRWLock< MutexT, RecurseCountsT >::State = TVirtualRWMutex::State |
Definition at line 298 of file TReentrantRWLock.hxx.
using ROOT::TReentrantRWLock< MutexT, RecurseCountsT >::StateDelta = TVirtualRWMutex::StateDelta |
Definition at line 299 of file TReentrantRWLock.hxx.
|
inline |
Regular constructor.
Definition at line 303 of file TReentrantRWLock.hxx.
void TReentrantRWLock::Apply | ( | std::unique_ptr< StateDelta > && | delta | ) |
Re-apply a delta.
Definition at line 358 of file TReentrantRWLock.cxx.
|
private |
Assert that presumedLocalReadersCount really matches the local read count.
Print an error message if not.
Definition at line 394 of file TReentrantRWLock.cxx.
std::unique_ptr< TVirtualRWMutex::State > TReentrantRWLock::GetStateBefore |
Get the lock state before the most recent write lock was taken.
Definition at line 260 of file TReentrantRWLock.cxx.
TVirtualRWMutex::Hint_t * TReentrantRWLock::ReadLock |
Acquire the lock in read mode.
Definition at line 70 of file TReentrantRWLock.cxx.
void TReentrantRWLock::ReadUnLock | ( | TVirtualRWMutex::Hint_t * | hint | ) |
Release the lock in read mode.
Definition at line 137 of file TReentrantRWLock.cxx.
std::unique_ptr< TVirtualRWMutex::StateDelta > TReentrantRWLock::Rewind | ( | const State & | earlierState | ) |
Rewind to an earlier mutex state, returning the delta.
Definition at line 300 of file TReentrantRWLock.cxx.
TVirtualRWMutex::Hint_t * TReentrantRWLock::WriteLock |
Acquire the lock in write mode.
Definition at line 169 of file TReentrantRWLock.cxx.
void TReentrantRWLock::WriteUnLock | ( | TVirtualRWMutex::Hint_t * | ) |
Release the lock in write mode.
Definition at line 217 of file TReentrantRWLock.cxx.
|
private |
! RWlock internal condition variable
Definition at line 286 of file TReentrantRWLock.hxx.
|
private |
! RWlock internal mutex
Definition at line 285 of file TReentrantRWLock.hxx.
|
private |
! A reader wants access
Definition at line 282 of file TReentrantRWLock.hxx.
|
private |
! Number of readers
Definition at line 281 of file TReentrantRWLock.hxx.
|
private |
! Trackers for re-entry in the lock by the same thread.
Definition at line 288 of file TReentrantRWLock.hxx.
|
private |
! Is there a writer?
Definition at line 284 of file TReentrantRWLock.hxx.
|
private |
! A writer wants access
Definition at line 283 of file TReentrantRWLock.hxx.