From 74a091aad2beae3398e01b431a09b0fd4d608204 Mon Sep 17 00:00:00 2001 From: Jamie Reece Wilson Date: Sun, 3 Sep 2023 14:07:39 +0100 Subject: [PATCH] [*] NT mutex regression --- Include/auROXTL/auAtomic.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Include/auROXTL/auAtomic.hpp b/Include/auROXTL/auAtomic.hpp index 8e5623f..02ece83 100644 --- a/Include/auROXTL/auAtomic.hpp +++ b/Include/auROXTL/auAtomic.hpp @@ -564,10 +564,12 @@ inline auline void AuAtomicUtils::ClearU8Lock(AuUInt8 *in) { #if defined(AURORA_COMPILER_MSVC) && (defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)) - ::_InterlockedExchange8((volatile char *)in, 0); + *in = 0; + ::_ReadWriteBarrier(); #elif defined(AURORA_COMPILER_MSVC) + ::_InterlockedExchange8((volatile char *)in, 0); // i think this will work on aarch64 and most risc architectures - InterlockedAndRelease((volatile LONG *)in, ~0xFF); + //InterlockedAndRelease((volatile LONG *)in, ~0xFF); #else ATOMIC_PREFIX_HAX(atomic_store)((atomic_uint_fast8_t *)in, 0, __ATOMIC_RELEASE); #if !(defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86))