 |
Bitcoin Core
21.99.0
P2P Digital Currency
|
Go to the documentation of this file.
6 #ifndef BITCOIN_UTIL_EPOCHGUARD_H
7 #define BITCOIN_UTIL_EPOCHGUARD_H
36 uint64_t m_raw_epoch = 0;
37 bool m_guarded =
false;
44 bool guarded()
const {
return m_guarded; }
49 uint64_t m_marker = 0;
79 if (marker.m_marker < m_raw_epoch) {
81 marker.m_marker = m_raw_epoch;
89 #define WITH_FRESH_EPOCH(epoch) const Epoch::Guard PASTE2(epoch_guard_, __COUNTER__)(epoch)
91 #endif // BITCOIN_UTIL_EPOCHGUARD_H
#define EXCLUSIVE_LOCK_FUNCTION(...)
#define UNLOCK_FUNCTION(...)
bool visited(Marker &marker) const EXCLUSIVE_LOCKS_REQUIRED(*this)
Epoch & operator=(const Epoch &)=delete
~Guard() UNLOCK_FUNCTION()
#define EXCLUSIVE_LOCKS_REQUIRED(...)
Guard(Epoch &epoch) EXCLUSIVE_LOCK_FUNCTION(epoch)
assert(std::addressof(::ChainstateActive().CoinsTip())==std::addressof(coins_cache))
Epoch: RAII-style guard for using epoch-based graph traversal algorithms.