[*] Linux/Modern NT regression in new optimized event wait path
This commit is contained in:
parent
22efbff12f
commit
d727859cc2
@ -52,23 +52,22 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
while (!AtomicIsEventSetLogicNoSpinNoLock())
|
||||
{
|
||||
bool bStatus {};
|
||||
EventBits bits;
|
||||
bits.state = AuAtomicLoad(&this->state_);
|
||||
|
||||
if (bits.bTriggered)
|
||||
{
|
||||
AuAtomicAdd(pSleepCounter, 1u);
|
||||
bool bStatus = InternalLTSWaitOnAddressHighRes(&this->state_, &bits.state, sizeof(bits.state), uEndTime);
|
||||
AuAtomicSub(pSleepCounter, 1u);
|
||||
|
||||
if (!bStatus)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
AuAtomicAdd(pSleepCounter, 1u);
|
||||
bStatus = InternalLTSWaitOnAddressHighRes(&this->state_, &bits.state, sizeof(bits.state), uEndTime);
|
||||
AuAtomicSub(pSleepCounter, 1u);
|
||||
|
||||
if (!bStatus)
|
||||
{
|
||||
SMPPause();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -114,23 +113,22 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
while (!AtomicIsEventSetLogicNoSpinNoLock())
|
||||
{
|
||||
bool bStatus {};
|
||||
EventBits bits;
|
||||
bits.state = AuAtomicLoad(&this->state_);
|
||||
|
||||
if (bits.bTriggered)
|
||||
{
|
||||
AuAtomicAdd(pSleepCounter, 1u);
|
||||
bool bStatus = InternalLTSWaitOnAddressHighRes(&this->state_, &bits.state, sizeof(bits.state), uEndTime);
|
||||
AuAtomicSub(pSleepCounter, 1u);
|
||||
|
||||
if (!bStatus)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
else
|
||||
|
||||
AuAtomicAdd(pSleepCounter, 1u);
|
||||
bStatus = InternalLTSWaitOnAddressHighRes(&this->state_, &bits.state, sizeof(bits.state), uEndTime);
|
||||
AuAtomicSub(pSleepCounter, 1u);
|
||||
|
||||
if (!bStatus)
|
||||
{
|
||||
SMPPause();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user