[*] Nt Condvars: I'm paranoid about this potential race condition

This commit is contained in:
Reece Wilson 2023-10-20 10:04:06 +01:00
parent 09401cecd6
commit 718b5a9316

View File

@ -307,6 +307,14 @@ namespace Aurora::Threading::Primitives
if (uSignalNext == 0) if (uSignalNext == 0)
{ {
InterlockedOr((volatile LONG *)&this->wlist, 1); InterlockedOr((volatile LONG *)&this->wlist, 1);
// paranoia
#if 1
if (AuAtomicLoad(&this->signalCount) != 0) [[unlikely]]
{
AuAtomicUnset(&this->wlist, 0);
}
#endif
} }
} }