mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Update c89atomic.
This commit is contained in:
+9
-8
@@ -7719,6 +7719,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
static C89ATOMIC_INLINE void __stdcall c89atomic_thread_fence(int order)
|
static C89ATOMIC_INLINE void __stdcall c89atomic_thread_fence(int order)
|
||||||
{
|
{
|
||||||
volatile c89atomic_uint32 barrier;
|
volatile c89atomic_uint32 barrier;
|
||||||
|
(void)order;
|
||||||
__asm {
|
__asm {
|
||||||
xchg barrier, eax
|
xchg barrier, eax
|
||||||
}
|
}
|
||||||
@@ -7857,7 +7858,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint8 newValue;
|
volatile c89atomic_uint8 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue - src;
|
newValue = (c89atomic_uint8)(oldValue - src);
|
||||||
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
@@ -7868,7 +7869,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint16 newValue;
|
volatile c89atomic_uint16 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue - src;
|
newValue = (c89atomic_uint16)(oldValue - src);
|
||||||
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
@@ -7901,7 +7902,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint8 newValue;
|
volatile c89atomic_uint8 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue & src;
|
newValue = (c89atomic_uint8)(oldValue & src);
|
||||||
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
@@ -7912,7 +7913,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint16 newValue;
|
volatile c89atomic_uint16 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue & src;
|
newValue = (c89atomic_uint16)(oldValue & src);
|
||||||
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
@@ -7945,7 +7946,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint8 newValue;
|
volatile c89atomic_uint8 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue ^ src;
|
newValue = (c89atomic_uint8)(oldValue ^ src);
|
||||||
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
@@ -7956,7 +7957,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint16 newValue;
|
volatile c89atomic_uint16 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue ^ src;
|
newValue = (c89atomic_uint16)(oldValue ^ src);
|
||||||
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
@@ -7989,7 +7990,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint8 newValue;
|
volatile c89atomic_uint8 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue | src;
|
newValue = (c89atomic_uint8)(oldValue | src);
|
||||||
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_8(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
@@ -8000,7 +8001,7 @@ typedef unsigned char c89atomic_flag;
|
|||||||
volatile c89atomic_uint16 newValue;
|
volatile c89atomic_uint16 newValue;
|
||||||
do {
|
do {
|
||||||
oldValue = *dst;
|
oldValue = *dst;
|
||||||
newValue = oldValue | src;
|
newValue = (c89atomic_uint16)(oldValue | src);
|
||||||
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
} while (c89atomic_compare_and_swap_16(dst, oldValue, newValue) != oldValue);
|
||||||
(void)order;
|
(void)order;
|
||||||
return oldValue;
|
return oldValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user