[+] ELoopSource expansion

This commit is contained in:
Reece Wilson 2023-12-18 07:37:48 +00:00
parent 22486b90e6
commit 414c736179
5 changed files with 17 additions and 12 deletions

View File

@ -15,7 +15,7 @@ namespace Aurora::IO::Loop
eSourceSemaphore,
eSourceCV,
eSourceEvent,
eSourceMutex, // WARNING: You should not use kernel mutex objects over AuThreadPrimitives
eSourceMutex,
eSourceSRW,
eSourceTimer,
@ -56,5 +56,10 @@ namespace Aurora::IO::Loop
eSourceInternalReserved2,
eSourceInternalReserved3,
eSourceInternalReserved4,
// fast objects
eSourceFastSemaphore,
eSourceFastEvent,
eSourceFastMutex
};
}

View File

@ -91,7 +91,7 @@ namespace Aurora::IO::Loop
ELoopSource LSLocalEvent::GetType()
{
return ELoopSource::eSourceEvent;
return ELoopSource::eSourceFastEvent;
}
bool LSLocalEvent::Set()

View File

@ -98,7 +98,7 @@ namespace Aurora::IO::Loop
ELoopSource LSLocalMutex::GetType()
{
return ELoopSource::eSourceMutex;
return ELoopSource::eSourceFastMutex;
}
bool LSLocalMutex::TryTakeNoSpin()

View File

@ -130,7 +130,7 @@ namespace Aurora::IO::Loop
ELoopSource LSLocalSemaphore::GetType()
{
return ELoopSource::eSourceSemaphore;
return ELoopSource::eSourceFastSemaphore;
}
bool LSLocalSemaphore::TryTakeNoSpin()

View File

@ -302,9 +302,9 @@ namespace Aurora::IO::Loop
auto eType = pSource->GetType();
if (eType == ELoopSource::eSourceMutex ||
eType == ELoopSource::eSourceSemaphore ||
eType == ELoopSource::eSourceEvent)
if (eType == ELoopSource::eSourceFastMutex ||
eType == ELoopSource::eSourceFastSemaphore ||
eType == ELoopSource::eSourceFastEvent)
{
auto pSourceEx = AuDynamicCast<Loop::ILoopSourceEx>(pSource);
@ -377,7 +377,7 @@ namespace Aurora::IO::Loop
}
bool bTooMany {};
#if defined(AURORA_IS_MODERNNT_DERIVED)
#if defined(AURORA_IS_MODERNNT_DERIVED)
if (AuBuild::kCurrentVendor == AuBuild::EVendor::eGenericMicrosoft &&
lsList2.size() < MAXIMUM_WAIT_OBJECTS)
{
@ -387,7 +387,7 @@ namespace Aurora::IO::Loop
false;
}
else
#endif
#endif
{
bTooMany = true;
}
@ -501,9 +501,9 @@ namespace Aurora::IO::Loop
auto eType = pLoopSource->GetType();
if (!bTimeout ||
eType == ELoopSource::eSourceMutex ||
eType == ELoopSource::eSourceSemaphore ||
eType == ELoopSource::eSourceEvent)
eType == ELoopSource::eSourceFastMutex ||
eType == ELoopSource::eSourceFastSemaphore ||
eType == ELoopSource::eSourceFastEvent)
{
if (pLoopSource->IsSignaledNoSpinIfUserland())
{