[*] WoA acbd6266 cont (?). I think I'm still getting messed up by over-optimizations as opposed to there being a genuine bug in the primitives. Made the accesses to the comparison volatile during deep sleeps, whereas before we were just casting to regular integer pointers or performing a memcmp.

00:29:11:820	15>  1 functions were new in current compilation
00:29:11:820	15>  51 functions had inline decision re-evaluated but remain unchanged
(it did *something*)
This commit is contained in:
Reece Wilson 2024-02-08 01:55:16 +00:00
parent 899e505b1e
commit 12fd03a6dd

View File

@ -80,6 +80,15 @@ namespace Aurora::Threading
this->Release();
}
static void FlushWaitBufferPAddressCache()
{
#if defined(MemoryBarrier)
MemoryBarrier();
#else
asm volatile ("" : : : "memory");
#endif
}
bool WaitEntry::SleepOn(WaitState &state)
{
#if !defined(WOA_SEMAPHORE_MODE)
@ -98,6 +107,8 @@ namespace Aurora::Threading
while (uNow < uEndTime)
{
FlushWaitBufferPAddressCache();
if (!WaitBuffer::Compare(this->pAddress, this->uSize, state))
{
return true;
@ -154,6 +165,8 @@ namespace Aurora::Threading
this->variable.WaitForSignalNsEx(&this->mutex, 0, false);
#endif
}
FlushWaitBufferPAddressCache();
}
return true;