Commit 6e255d2e authored by Maged Michael's avatar Maged Michael Committed by Facebook GitHub Bot

hazard pointers: Fix hazptr_tc_evict

Summary: Fix exit-time destructor warning for hazptr_tc_evict.

Differential Revision: D32099949

fbshipit-source-id: f9f12143f4d06fda1122c8a8d741d6381105253f
parent ed5e3082
......@@ -120,6 +120,7 @@ template <template <typename> class Atom = std::atomic>
hazptr_tc<Atom>& hazptr_tc_tls();
/** hazptr_tc_evict -- Used only for benchmarking */
template <template <typename> class Atom = std::atomic>
void hazptr_tc_evict();
///
......
......@@ -87,7 +87,7 @@ class hazptr_tc {
friend hazptr_holder<Atom> make_hazard_pointer<Atom>(hazptr_domain<Atom>&);
template <uint8_t M, template <typename> class A>
friend hazptr_array<M, A> make_hazard_pointer_array();
friend void hazptr_tc_evict();
friend void hazptr_tc_evict<Atom>();
FOLLY_ALWAYS_INLINE
hazptr_tc_entry<Atom>& operator[](uint8_t i) noexcept {
......@@ -170,8 +170,9 @@ FOLLY_ALWAYS_INLINE hazptr_tc<Atom>& hazptr_tc_tls() {
}
/** hazptr_tc_evict -- Used only for benchmarking */
inline void hazptr_tc_evict() {
hazptr_tc_tls<>().evict();
template <template <typename> class Atom>
void hazptr_tc_evict() {
hazptr_tc_tls<Atom>().evict();
}
} // namespace folly
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment