[*] NT mutex regression

This commit is contained in:
Reece Wilson 2023-09-03 14:07:39 +01:00
parent 01d9b6754f
commit 74a091aad2

View File

@ -564,10 +564,12 @@ inline auline
void AuAtomicUtils<AuUInt8>::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))