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; }
52 uint64_t m_marker = 0;
87 if (marker.m_marker < m_raw_epoch) {
89 marker.m_marker = m_raw_epoch;
97#define WITH_FRESH_EPOCH(epoch) \
98 const Epoch::Guard UNIQUE_NAME(epoch_guard_)(epoch)
~Guard() UNLOCK_FUNCTION()
Guard(Epoch &epoch) EXCLUSIVE_LOCK_FUNCTION(epoch)
Marker & operator=(Marker &&)=delete
Marker & operator=(const Marker &)=delete
Marker(const Marker &)=default
Epoch: RAII-style guard for using epoch-based graph traversal algorithms.
Epoch(const Epoch &)=delete
Epoch & operator=(Epoch &&)=delete
bool visited(Marker &marker) const EXCLUSIVE_LOCKS_REQUIRED(*this)
Epoch & operator=(const Epoch &)=delete
#define EXCLUSIVE_LOCKS_REQUIRED(...)
#define EXCLUSIVE_LOCK_FUNCTION(...)
#define UNLOCK_FUNCTION(...)