[-] More redundant code from WakeOnAddress
This commit is contained in:
parent
b90feae7d0
commit
94e2f7924e
@ -132,13 +132,8 @@ namespace Aurora::Threading
|
||||
return true;
|
||||
}
|
||||
|
||||
AuUInt64 uEndTime {};
|
||||
auto uNow = AuTime::SteadyClockNS();
|
||||
|
||||
if (state.qwNanosecondsAbs)
|
||||
{
|
||||
uEndTime = state.qwNanosecondsAbs.value();
|
||||
}
|
||||
auto uEndTime = state.qwNanosecondsAbs.value();
|
||||
|
||||
while (uNow < uEndTime)
|
||||
{
|
||||
@ -342,45 +337,6 @@ namespace Aurora::Threading
|
||||
this->uAtomic = 0;
|
||||
}
|
||||
|
||||
void ProcessWaitContainer::Remove(WaitEntry *pParent)
|
||||
{
|
||||
Lock();
|
||||
{
|
||||
auto pCurrent = this->waitList.pTail;
|
||||
decltype(pCurrent) pLast {};
|
||||
while (pCurrent)
|
||||
{
|
||||
if (pCurrent == pParent)
|
||||
{
|
||||
if (pLast)
|
||||
{
|
||||
pLast->pNext = pCurrent->pNext;
|
||||
}
|
||||
else if (this->waitList.pHead == pCurrent)
|
||||
{
|
||||
this->waitList.pHead = pCurrent->pNext;
|
||||
}
|
||||
|
||||
if (pCurrent->pNext)
|
||||
{
|
||||
pCurrent->pNext->pBefore = pCurrent->pBefore;
|
||||
}
|
||||
|
||||
if (this->waitList.pTail == pParent)
|
||||
{
|
||||
this->waitList.pTail = pLast;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
pLast = pCurrent;
|
||||
pCurrent = pCurrent->pBefore;
|
||||
}
|
||||
}
|
||||
Unlock();
|
||||
}
|
||||
|
||||
AUKN_SYM bool IsWaitOnRecommended()
|
||||
{
|
||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||
|
@ -87,7 +87,5 @@ namespace Aurora::Threading
|
||||
void Lock();
|
||||
|
||||
void Unlock();
|
||||
|
||||
void Remove(WaitEntry *pParent);
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user