|
@@ -1032,7 +1032,7 @@ HL_PRIM int hl_atomic_add32(int *a, int b) {
|
|
|
#if defined(HL_GCC_ATOMICS)
|
|
|
return __atomic_fetch_add(a, b, __ATOMIC_SEQ_CST);
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedExchangeAdd((LONG volatile *)a, b);
|
|
|
+ return _InterlockedExchangeAdd((long volatile *)a, b);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1040,7 +1040,7 @@ HL_PRIM int hl_atomic_sub32(int *a, int b) {
|
|
|
#if defined(HL_GCC_ATOMICS)
|
|
|
return __atomic_fetch_sub(a, b, __ATOMIC_SEQ_CST);
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedExchangeAdd((LONG volatile *)a, -b);
|
|
|
+ return _InterlockedExchangeAdd((long volatile *)a, -b);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1048,7 +1048,7 @@ HL_PRIM int hl_atomic_and32(int *a, int b) {
|
|
|
#if defined(HL_GCC_ATOMICS)
|
|
|
return __atomic_fetch_and(a, b, __ATOMIC_SEQ_CST);
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedAnd((LONG volatile *)a, b);
|
|
|
+ return _InterlockedAnd((long volatile *)a, b);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1056,7 +1056,7 @@ HL_PRIM int hl_atomic_or32(int *a, int b) {
|
|
|
#if defined(HL_GCC_ATOMICS)
|
|
|
return __atomic_fetch_or(a, b, __ATOMIC_SEQ_CST);
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedOr((LONG volatile *)a, b);
|
|
|
+ return _InterlockedOr((long volatile *)a, b);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1064,7 +1064,7 @@ HL_PRIM int hl_atomic_xor32(int *a, int b) {
|
|
|
#if defined(HL_GCC_ATOMICS)
|
|
|
return __atomic_fetch_xor(a, b, __ATOMIC_SEQ_CST);
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedXor((LONG volatile *)a, b);
|
|
|
+ return _InterlockedXor((long volatile *)a, b);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1076,7 +1076,7 @@ HL_PRIM int hl_atomic_compare_exchange32(int *a, int expected,
|
|
|
__ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
|
|
|
return _expected;
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedCompareExchange((LONG volatile *)a, replacement, expected);
|
|
|
+ return _InterlockedCompareExchange((long volatile *)a, replacement, expected);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1099,7 +1099,7 @@ HL_PRIM int hl_atomic_exchange32(int *a, int replacement) {
|
|
|
__atomic_exchange(a, &replacement, &ret, __ATOMIC_SEQ_CST);
|
|
|
return ret;
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedExchange((LONG volatile *)a, replacement);
|
|
|
+ return _InterlockedExchange((long volatile *)a, replacement);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1119,7 +1119,7 @@ HL_PRIM int hl_atomic_load32(int *a) {
|
|
|
__atomic_load(a, &ret, __ATOMIC_SEQ_CST);
|
|
|
return ret;
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- return _InterlockedXor((LONG volatile *)a, 0);
|
|
|
+ return _InterlockedXor((long volatile *)a, 0);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
@@ -1132,7 +1132,7 @@ HL_PRIM void *hl_atomic_load_ptr(void **a) {
|
|
|
#ifdef HL_64
|
|
|
return (void *)_InterlockedXor64((__int64 volatile *)a, 0);
|
|
|
#else
|
|
|
- return (void *)_InterlockedXor((LONG volatile *)a, 0);
|
|
|
+ return (void *)_InterlockedXor((long volatile *)a, 0);
|
|
|
#endif
|
|
|
#endif
|
|
|
}
|
|
@@ -1142,7 +1142,7 @@ HL_PRIM int hl_atomic_store32(int *a, int value) {
|
|
|
__atomic_store(a, &value, __ATOMIC_SEQ_CST);
|
|
|
return value;
|
|
|
#elif defined(HL_VCC_ATOMICS)
|
|
|
- _InterlockedExchange((LONG volatile *)a, value);
|
|
|
+ _InterlockedExchange((long volatile *)a, value);
|
|
|
return value;
|
|
|
#endif
|
|
|
}
|