From 2564a3750f4c012dc33da8192d12b0c2247c3829 Mon Sep 17 00:00:00 2001 From: Chris Robinson <chris.kcat@gmail.com> Date: Wed, 23 Feb 2022 06:42:09 -0800 Subject: Remove unused atomic_invflag --- common/atomic.h | 19 ------------------- 1 file changed, 19 deletions(-) (limited to 'common/atomic.h') diff --git a/common/atomic.h b/common/atomic.h index affbc115..5e9b04c6 100644 --- a/common/atomic.h +++ b/common/atomic.h @@ -2,27 +2,8 @@ #define AL_ATOMIC_H #include <atomic> -#include <utility> -namespace al { - -struct atomic_invflag : protected std::atomic_flag { - using std::atomic_flag::atomic_flag; - - inline bool test_and_clear(std::memory_order m=std::memory_order_seq_cst) noexcept - { return !test_and_set(m); } - inline bool test_and_clear(std::memory_order m=std::memory_order_seq_cst) volatile noexcept - { return !test_and_set(m); } - - inline void set(std::memory_order m=std::memory_order_seq_cst) noexcept - { clear(m); } - inline void set(std::memory_order m=std::memory_order_seq_cst) volatile noexcept - { clear(m); } -}; - -} // namespace al - using RefCount = std::atomic<unsigned int>; inline void InitRef(RefCount &ref, unsigned int value) -- cgit v1.2.3