31 template <
template <
typename>
class Atom>
32 class alignas(hardware_destructive_interference_size) hazptr_rec {
33 Atom<const void*> hazptr_{
nullptr};
36 Atom<bool> active_{
false};
43 return hazptr_.load(std::memory_order_acquire);
47 hazptr_.store(p, std::memory_order_release);
51 return active_.load(std::memory_order_acquire);
55 active_.store(
true, std::memory_order_relaxed);
61 active_.compare_exchange_strong(
62 a,
true, std::memory_order_release, std::memory_order_relaxed);
66 active_.store(
false, std::memory_order_release);
#define FOLLY_ALWAYS_INLINE
—— Concurrent Priority Queue Implementation ——
requires E e noexcept(noexcept(s.error(std::move(e))))
void set_domain(hazptr_domain< Atom > *dom)
const void * hazptr() const noexcept
void set_next(hazptr_rec< Atom > *rec)
hazptr_domain< Atom > * domain_
FOLLY_ALWAYS_INLINE hazptr_domain< Atom > * domain()
FOLLY_ALWAYS_INLINE void reset_hazptr(const void *p=nullptr) noexcept
bool try_acquire() noexcept
bool active() const noexcept
hazptr_rec< Atom > * next()
void set_active() noexcept