aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/atomic.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/common/atomic.h b/common/atomic.h
index 87560e3d..eaae8fb8 100644
--- a/common/atomic.h
+++ b/common/atomic.h
@@ -14,8 +14,6 @@
#define ATOMIC(T) std::atomic<T>
-#define ATOMIC_INIT std::atomic_init
-
#define ATOMIC_LOAD std::atomic_load_explicit
#define ATOMIC_STORE std::atomic_store_explicit
@@ -33,7 +31,7 @@
using RefCount = std::atomic<unsigned int>;
inline void InitRef(RefCount *ptr, unsigned int value)
-{ ATOMIC_INIT(ptr, value); }
+{ ptr->store(value, std::memory_order_relaxed); }
inline unsigned int ReadRef(RefCount *ptr)
{ return ptr->load(std::memory_order_acquire); }
inline unsigned int IncrementRef(RefCount *ptr)