mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Update c89atomic.
Public issue https://github.com/mackron/miniaudio/issues/1045
This commit is contained in:
+24
-1
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user