#pragma once
#include <atomic>
#include <memory>
#if FOLLY_MOBILE
#define FOLLY_HAZPTR_THR_LOCAL …
#else
#define FOLLY_HAZPTR_THR_LOCAL …
#endif
namespace folly {
template <template <typename> class Atom = std::atomic>
class hazptr_rec;
template <template <typename> class Atom = std::atomic>
class hazptr_obj;
template <template <typename> class Atom = std::atomic>
class hazptr_obj_list;
template <template <typename> class Atom = std::atomic>
class hazptr_obj_cohort;
template <template <typename> class Atom = std::atomic>
class hazptr_obj_retired_list;
template <typename T, typename D>
class hazptr_deleter;
template <
typename T,
template <typename> class Atom = std::atomic,
typename D = std::default_delete<T>>
class hazptr_obj_base;
hazard_pointer_obj_base;
template <typename T, template <typename> class Atom = std::atomic>
class hazptr_root;
template <template <typename> class Atom = std::atomic>
class hazptr_obj_linked;
template <
typename T,
template <typename> class Atom = std::atomic,
typename Deleter = std::default_delete<T>>
class hazptr_obj_base_linked;
template <template <typename> class Atom = std::atomic>
class hazptr_tc_entry;
template <template <typename> class Atom = std::atomic>
class hazptr_tc;
template <template <typename> class Atom = std::atomic>
hazptr_tc<Atom>& hazptr_tc_tls();
template <template <typename> class Atom = std::atomic>
void hazptr_tc_evict();
template <template <typename> class Atom = std::atomic>
class hazptr_domain;
hazard_pointer_domain;
template <template <typename> class Atom = std::atomic>
hazptr_domain<Atom>& default_hazptr_domain();
template <template <typename> class Atom = std::atomic>
hazard_pointer_domain<Atom>& hazard_pointer_default_domain();
template <template <typename> class Atom = std::atomic>
void hazptr_domain_push_retired(
hazptr_obj_list<Atom>& l,
hazptr_domain<Atom>& domain = default_hazptr_domain<Atom>()) noexcept;
template <
template <typename> class Atom = std::atomic,
typename T,
typename D = std::default_delete<T>>
void hazptr_retire(T* obj, D reclaim = { … };
template <template <typename> class Atom = std::atomic>
void hazptr_cleanup(
hazptr_domain<Atom>& domain = default_hazptr_domain<Atom>()) noexcept;
template <template <typename> class Atom = std::atomic>
void hazard_pointer_clean_up(
hazard_pointer_domain<Atom>& domain =
hazard_pointer_default_domain<Atom>()) noexcept;
extern hazptr_domain<std::atomic> default_domain;
bool hazptr_use_executor();
template <template <typename> class Atom = std::atomic>
class hazptr_holder;
hazard_pointer;
template <template <typename> class Atom = std::atomic>
hazptr_holder<Atom> make_hazard_pointer(
hazptr_domain<Atom>& domain = default_hazptr_domain<Atom>());
template <template <typename> class Atom = std::atomic>
void swap(hazptr_holder<Atom>&, hazptr_holder<Atom>&) noexcept;
template <uint8_t M = 1, template <typename> class Atom = std::atomic>
class hazptr_array;
template <uint8_t M = 1, template <typename> class Atom = std::atomic>
hazptr_array<M, Atom> make_hazard_pointer_array();
template <uint8_t M = 1, template <typename> class Atom = std::atomic>
class hazptr_local;
}