[-] More redundant code from WakeOnAddress

This commit is contained in:
Reece Wilson 2023-07-06 09:43:28 +01:00
parent b90feae7d0
commit 94e2f7924e
2 changed files with 2 additions and 48 deletions

View File

@ -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)
{
@ -341,46 +336,7 @@ 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)

View File

@ -87,7 +87,5 @@ namespace Aurora::Threading
void Lock();
void Unlock();
void Remove(WaitEntry *pParent);
};
}