Update c89atomic.

Public issue https://github.com/mackron/miniaudio/issues/1045
This commit is contained in:
David Reid
2025-09-19 12:46:50 +10:00
parent 2e02046c6d
commit 089f041120
+24 -1
View File
@@ -14241,6 +14241,29 @@ typedef int ma_atomic_memory_order;
#define ma_atomic_memory_order_release 4 #define ma_atomic_memory_order_release 4
#define ma_atomic_memory_order_acq_rel 5 #define ma_atomic_memory_order_acq_rel 5
#define ma_atomic_memory_order_seq_cst 6 #define ma_atomic_memory_order_seq_cst 6
#define MA_ATOMIC_MSVC_ARM_INTRINSIC_NORETURN(dst, src, order, intrin, ma_atomicType, msvcType) \
switch (order) \
{ \
case ma_atomic_memory_order_relaxed: \
{ \
intrin##_nf((volatile msvcType*)dst, (msvcType)src); \
} break; \
case ma_atomic_memory_order_consume: \
case ma_atomic_memory_order_acquire: \
{ \
intrin##_acq((volatile msvcType*)dst, (msvcType)src); \
} break; \
case ma_atomic_memory_order_release: \
{ \
intrin##_rel((volatile msvcType*)dst, (msvcType)src); \
} break; \
case ma_atomic_memory_order_acq_rel: \
case ma_atomic_memory_order_seq_cst: \
default: \
{ \
intrin((volatile msvcType*)dst, (msvcType)src); \
} break; \
} \
#define MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, intrin, ma_atomicType, msvcType) \ #define MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, src, order, intrin, ma_atomicType, msvcType) \
ma_atomicType result; \ ma_atomicType result; \
switch (order) \ switch (order) \
@@ -14284,7 +14307,7 @@ typedef int ma_atomic_memory_order;
{ {
#if defined(MA_ARM) #if defined(MA_ARM)
{ {
MA_ATOMIC_MSVC_ARM_INTRINSIC(dst, 0, order, _InterlockedExchange, ma_atomic_flag, long); MA_ATOMIC_MSVC_ARM_INTRINSIC_NORETURN(dst, 0, order, _InterlockedExchange, ma_atomic_flag, long);
} }
#else #else
{ {