Logo ROOT  
Reference Guide
TRWMutexImp.h
Go to the documentation of this file.
1// Author: Philippe Canal, 2017
2
3/*************************************************************************
4 * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_TRWMutexImp
12#define ROOT_TRWMutexImp
13
14#include "TVirtualRWMutex.h"
15#include "ROOT/TSpinMutex.hxx"
17
18#include "TBuffer.h" // Needed by ClassDefInlineOverride
19
20namespace ROOT {
21template <typename MutexT, typename RecurseCountsT = ROOT::Internal::RecurseCounts>
24
25public:
26 Hint_t * ReadLock() override;
27 void ReadUnLock(Hint_t *) override;
28 Hint_t * WriteLock() override;
29 void WriteUnLock(Hint_t *) override;
30
31 TVirtualRWMutex *Factory(Bool_t /*recursive*/ = kFALSE) override;
32 std::unique_ptr<State> GetStateBefore() override;
33 std::unique_ptr<StateDelta> Rewind(const State &earlierState) override;
34 void Apply(std::unique_ptr<StateDelta> &&delta) override;
35
36 ClassDefInlineOverride(TRWMutexImp,0) // Concrete RW mutex lock class
37};
38
39} // namespace ROOT.
40
41#endif
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
#define ClassDefInlineOverride(name, id)
Definition: Rtypes.h:342
ROOT::TReentrantRWLock< MutexT, RecurseCountsT > fMutexImp
Definition: TRWMutexImp.h:23
void Apply(std::unique_ptr< StateDelta > &&delta) override
Apply the mutex state delta.
Definition: TRWMutexImp.cxx:95
void WriteUnLock(Hint_t *) override
Release the read lock of the mutex.
Definition: TRWMutexImp.cxx:58
std::unique_ptr< StateDelta > Rewind(const State &earlierState) override
Restore the mutex state to state.
Definition: TRWMutexImp.cxx:84
Hint_t * WriteLock() override
Take the Write Lock of the mutex.
Definition: TRWMutexImp.cxx:40
std::unique_ptr< State > GetStateBefore() override
Get the mutex state before the current lock was taken.
Hint_t * ReadLock() override
Take the Read Lock of the mutex.
Definition: TRWMutexImp.cxx:31
TVirtualRWMutex * Factory(Bool_t=kFALSE) override
Create mutex and return pointer to it.
Definition: TRWMutexImp.cxx:67
void ReadUnLock(Hint_t *) override
Release the read lock of the mutex.
Definition: TRWMutexImp.cxx:49
VSD Structures.
Definition: StringConv.hxx:21
Earlier lock state as returned by GetState() that can be passed to Restore()