Skip to content

Commit

Permalink
atomic: Remove an unused macro
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Nov 2, 2024
1 parent 16a769e commit 516bd22
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions mcfgthread/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

#if defined __GNUC__ || defined __clang__
/* Use built-in types. */
# define __MCF_atomic(...) volatile __VA_ARGS__
# define __MCF_ATOMICIFY(T, ...) ((volatile T*) (__VA_ARGS__))
# define __MCF_ATOMICIFY(T, ...) __MCF_CAST_PTR(volatile T, __VA_ARGS__)

# define __MCF_memory_order_rlx __ATOMIC_RELAXED
# define __MCF_memory_order_acq __ATOMIC_ACQUIRE
Expand All @@ -36,8 +35,7 @@
#elif defined __cplusplus && (__cplusplus >= 201103L)
/* Use the C++11 standard library. */
# include <atomic>
# define __MCF_atomic(...) ::std::atomic<__VA_ARGS__>
# define __MCF_ATOMICIFY(T, ...) ((::std::atomic<T>*) (__VA_ARGS__))
# define __MCF_ATOMICIFY(T, ...) __MCF_CAST_PTR(::std::atomic<T>, __VA_ARGS__)

# define __MCF_memory_order_rlx ::std::memory_order_relaxed
# define __MCF_memory_order_acq ::std::memory_order_acquire
Expand All @@ -59,8 +57,7 @@
/* Use the C11 standard library. Microsoft Visual Studio 2022 has experimental
* support which seems to suffice. */
# include <stdatomic.h>
# define __MCF_atomic(...) _Atomic(__VA_ARGS__)
# define __MCF_ATOMICIFY(T, ...) ((_Atomic T*) (__VA_ARGS__))
# define __MCF_ATOMICIFY(T, ...) __MCF_CAST_PTR(_Atomic T, __VA_ARGS__)

# define __MCF_memory_order_rlx memory_order_relaxed
# define __MCF_memory_order_acq memory_order_acquire
Expand Down

0 comments on commit 516bd22

Please sign in to comment.