6 #ifndef BITCOIN_UTIL_EPOCHGUARD_H 7 #define BITCOIN_UTIL_EPOCHGUARD_H 37 uint64_t m_raw_epoch = 0;
38 bool m_guarded =
false;
48 bool guarded()
const {
return m_guarded; }
53 uint64_t m_marker = 0;
90 if (marker.m_marker < m_raw_epoch) {
92 marker.m_marker = m_raw_epoch;
100 #define WITH_FRESH_EPOCH(epoch) const Epoch::Guard UNIQUE_NAME(epoch_guard_)(epoch) 102 #endif // BITCOIN_UTIL_EPOCHGUARD_H #define EXCLUSIVE_LOCK_FUNCTION(...)
Epoch & operator=(const Epoch &)=delete
~Guard() UNLOCK_FUNCTION()
#define UNLOCK_FUNCTION(...)
Guard(Epoch &epoch) EXCLUSIVE_LOCK_FUNCTION(epoch)
#define EXCLUSIVE_LOCKS_REQUIRED(...)
bool visited(Marker &marker) const EXCLUSIVE_LOCKS_REQUIRED(*this)
Epoch: RAII-style guard for using epoch-based graph traversal algorithms.