Remove unused atomic_invflag

master
Chris Robinson 2022-02-23 06:42:09 -08:00
parent 625b0d380a
commit 2564a3750f
1 changed files with 0 additions and 19 deletions

View File

@ -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)