[*] Move this branch in NTs condvar
This commit is contained in:
parent
8c84ecf892
commit
536522743a
@ -89,12 +89,16 @@ namespace Aurora::Threading::Primitives
|
||||
// keep this codeblock in parity
|
||||
// defer to the comments in that source file
|
||||
|
||||
if (gUseNativeWaitCondvar)
|
||||
{
|
||||
auto &uValueRef = this->lock_.uWaitCount;
|
||||
|
||||
#if defined(AURORA_ARCH_X86) || defined(AURORA_ARCH_X64)
|
||||
*(AuUInt8 *)&uValueRef = 0;
|
||||
#else
|
||||
InterlockedAndRelease((volatile LONG *)&uValueRef, ~0xFF);
|
||||
#endif
|
||||
|
||||
if (gUseNativeWaitCondvar)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
auto uValue = uValueRef;
|
||||
@ -112,17 +116,9 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
SMPPause();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
auto &uValueRef = this->lock_.uWaitCount;
|
||||
|
||||
#if defined(AURORA_ARCH_X86) || defined(AURORA_ARCH_X64)
|
||||
*(AuUInt8 *)&uValueRef = 0;
|
||||
#else
|
||||
InterlockedAndRelease((volatile LONG *)&uValueRef, ~0xFF);
|
||||
#endif
|
||||
|
||||
else
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
auto uOld = uValueRef;
|
||||
@ -159,6 +155,7 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
SMPPause();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user