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(...)
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.