[*] 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())
|
while (!AtomicIsEventSetLogicNoSpinNoLock())
|
||||||
{
|
{
|
||||||
|
bool bStatus {};
|
||||||
EventBits bits;
|
EventBits bits;
|
||||||
bits.state = AuAtomicLoad(&this->state_);
|
bits.state = AuAtomicLoad(&this->state_);
|
||||||
|
|
||||||
if (bits.bTriggered)
|
if (bits.bTriggered)
|
||||||
{
|
{
|
||||||
AuAtomicAdd(pSleepCounter, 1u);
|
continue;
|
||||||
bool bStatus = InternalLTSWaitOnAddressHighRes(&this->state_, &bits.state, sizeof(bits.state), uEndTime);
|
|
||||||
AuAtomicSub(pSleepCounter, 1u);
|
|
||||||
|
|
||||||
if (!bStatus)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
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())
|
while (!AtomicIsEventSetLogicNoSpinNoLock())
|
||||||
{
|
{
|
||||||
|
bool bStatus {};
|
||||||
EventBits bits;
|
EventBits bits;
|
||||||
bits.state = AuAtomicLoad(&this->state_);
|
bits.state = AuAtomicLoad(&this->state_);
|
||||||
|
|
||||||
if (bits.bTriggered)
|
if (bits.bTriggered)
|
||||||
{
|
{
|
||||||
AuAtomicAdd(pSleepCounter, 1u);
|
continue;
|
||||||
bool bStatus = InternalLTSWaitOnAddressHighRes(&this->state_, &bits.state, sizeof(bits.state), uEndTime);
|
|
||||||
AuAtomicSub(pSleepCounter, 1u);
|
|
||||||
|
|
||||||
if (!bStatus)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
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