From 9c8f07cb5d73fc4cd7b5db0cc7d35cada369ec29 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Tue, 19 Dec 2023 01:25:18 +0000 Subject: [PATCH] [*] Clang Win32 compilation --- Include/auROXTL/auAtomic.hpp | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Include/auROXTL/auAtomic.hpp b/Include/auROXTL/auAtomic.hpp index 04cc63f..4709c03 100644 --- a/Include/auROXTL/auAtomic.hpp +++ b/Include/auROXTL/auAtomic.hpp @@ -443,35 +443,35 @@ inline auline T AuAtomicUtils::Load(T *in) #endif if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast8_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt8) *)(in), __ATOMIC_ACQUIRE); } else if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast8_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt8) *)(in), __ATOMIC_ACQUIRE); } else if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast16_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt16) *)(in), __ATOMIC_ACQUIRE); } else if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast16_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt16) *)(in), __ATOMIC_ACQUIRE); } else if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast32_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt32) *)(in), __ATOMIC_ACQUIRE); } else if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast32_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt32) *)(in), __ATOMIC_ACQUIRE); } else if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_uint_fast64_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuUInt64) *)(in), __ATOMIC_ACQUIRE); } else if constexpr (AuIsSame_v) { - return ATOMIC_PREFIX_HAX(atomic_load)((atomic_int_fast64_t *)in, __ATOMIC_ACQUIRE); + return ATOMIC_PREFIX_HAX(atomic_load)((_Atomic(AuInt64) *)(in), __ATOMIC_ACQUIRE); } else { @@ -533,35 +533,35 @@ inline auline void AuAtomicUtils::Store(T *in, T val) #else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast8_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt8) *)(in), val, __ATOMIC_RELEASE); } else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast8_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt8) *)(in), val, __ATOMIC_RELEASE); } else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast16_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt16) *)(in), val, __ATOMIC_RELEASE); } else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast16_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt16) *)(in), val, __ATOMIC_RELEASE); } else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast32_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt32) *)(in), val, __ATOMIC_RELEASE); } else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast32_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt32) *)(in), val, __ATOMIC_RELEASE); } else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast64_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt64) *)(in), val, __ATOMIC_RELEASE); } else if constexpr (AuIsSame_v) { - ATOMIC_PREFIX_HAX(atomic_store)((atomic_int_fast64_t *)in, val, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuInt64) *)(in), val, __ATOMIC_RELEASE); } else { @@ -585,7 +585,7 @@ void AuAtomicUtils::ClearU8Lock(AuUInt8 *in) // i think this will work on aarch64 and most risc architectures //InterlockedAndRelease((volatile LONG *)in, ~0xFF); #else - ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast8_t *)in, 0, __ATOMIC_RELEASE); + ATOMIC_PREFIX_HAX(atomic_store)((_Atomic(AuUInt8) *)(in), 0, __ATOMIC_RELEASE); #if !(defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)) __sync_synchronize(); #endif