Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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"
16#include "TReentrantRWLock.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
constexpr Bool_t kFALSE
Definition RtypesCore.h:101
#define ClassDefInlineOverride(name, id)
Definition Rtypes.h:353
ROOT::TReentrantRWLock< MutexT, RecurseCountsT > fMutexImp
Definition TRWMutexImp.h:23
void Apply(std::unique_ptr< StateDelta > &&delta) override
Apply the mutex state delta.
void WriteUnLock(Hint_t *) override
Release the read lock of the mutex.
std::unique_ptr< StateDelta > Rewind(const State &earlierState) override
Restore the mutex state to state.
Hint_t * WriteLock() override
Take the Write Lock of the mutex.
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.
void ReadUnLock(Hint_t *) override
Release the read lock of the mutex.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Earlier lock state as returned by GetState() that can be passed to Restore()