[+] ELoopSource expansion
This commit is contained in:
parent
22486b90e6
commit
414c736179
@ -15,7 +15,7 @@ namespace Aurora::IO::Loop
|
|||||||
eSourceSemaphore,
|
eSourceSemaphore,
|
||||||
eSourceCV,
|
eSourceCV,
|
||||||
eSourceEvent,
|
eSourceEvent,
|
||||||
eSourceMutex, // WARNING: You should not use kernel mutex objects over AuThreadPrimitives
|
eSourceMutex,
|
||||||
eSourceSRW,
|
eSourceSRW,
|
||||||
eSourceTimer,
|
eSourceTimer,
|
||||||
|
|
||||||
@ -56,5 +56,10 @@ namespace Aurora::IO::Loop
|
|||||||
eSourceInternalReserved2,
|
eSourceInternalReserved2,
|
||||||
eSourceInternalReserved3,
|
eSourceInternalReserved3,
|
||||||
eSourceInternalReserved4,
|
eSourceInternalReserved4,
|
||||||
|
|
||||||
|
// fast objects
|
||||||
|
eSourceFastSemaphore,
|
||||||
|
eSourceFastEvent,
|
||||||
|
eSourceFastMutex
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -91,7 +91,7 @@ namespace Aurora::IO::Loop
|
|||||||
|
|
||||||
ELoopSource LSLocalEvent::GetType()
|
ELoopSource LSLocalEvent::GetType()
|
||||||
{
|
{
|
||||||
return ELoopSource::eSourceEvent;
|
return ELoopSource::eSourceFastEvent;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LSLocalEvent::Set()
|
bool LSLocalEvent::Set()
|
||||||
|
@ -98,7 +98,7 @@ namespace Aurora::IO::Loop
|
|||||||
|
|
||||||
ELoopSource LSLocalMutex::GetType()
|
ELoopSource LSLocalMutex::GetType()
|
||||||
{
|
{
|
||||||
return ELoopSource::eSourceMutex;
|
return ELoopSource::eSourceFastMutex;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LSLocalMutex::TryTakeNoSpin()
|
bool LSLocalMutex::TryTakeNoSpin()
|
||||||
|
@ -130,7 +130,7 @@ namespace Aurora::IO::Loop
|
|||||||
|
|
||||||
ELoopSource LSLocalSemaphore::GetType()
|
ELoopSource LSLocalSemaphore::GetType()
|
||||||
{
|
{
|
||||||
return ELoopSource::eSourceSemaphore;
|
return ELoopSource::eSourceFastSemaphore;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LSLocalSemaphore::TryTakeNoSpin()
|
bool LSLocalSemaphore::TryTakeNoSpin()
|
||||||
|
@ -302,9 +302,9 @@ namespace Aurora::IO::Loop
|
|||||||
|
|
||||||
auto eType = pSource->GetType();
|
auto eType = pSource->GetType();
|
||||||
|
|
||||||
if (eType == ELoopSource::eSourceMutex ||
|
if (eType == ELoopSource::eSourceFastMutex ||
|
||||||
eType == ELoopSource::eSourceSemaphore ||
|
eType == ELoopSource::eSourceFastSemaphore ||
|
||||||
eType == ELoopSource::eSourceEvent)
|
eType == ELoopSource::eSourceFastEvent)
|
||||||
{
|
{
|
||||||
auto pSourceEx = AuDynamicCast<Loop::ILoopSourceEx>(pSource);
|
auto pSourceEx = AuDynamicCast<Loop::ILoopSourceEx>(pSource);
|
||||||
|
|
||||||
@ -377,7 +377,7 @@ namespace Aurora::IO::Loop
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool bTooMany {};
|
bool bTooMany {};
|
||||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||||
if (AuBuild::kCurrentVendor == AuBuild::EVendor::eGenericMicrosoft &&
|
if (AuBuild::kCurrentVendor == AuBuild::EVendor::eGenericMicrosoft &&
|
||||||
lsList2.size() < MAXIMUM_WAIT_OBJECTS)
|
lsList2.size() < MAXIMUM_WAIT_OBJECTS)
|
||||||
{
|
{
|
||||||
@ -387,7 +387,7 @@ namespace Aurora::IO::Loop
|
|||||||
false;
|
false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
bTooMany = true;
|
bTooMany = true;
|
||||||
}
|
}
|
||||||
@ -501,9 +501,9 @@ namespace Aurora::IO::Loop
|
|||||||
auto eType = pLoopSource->GetType();
|
auto eType = pLoopSource->GetType();
|
||||||
|
|
||||||
if (!bTimeout ||
|
if (!bTimeout ||
|
||||||
eType == ELoopSource::eSourceMutex ||
|
eType == ELoopSource::eSourceFastMutex ||
|
||||||
eType == ELoopSource::eSourceSemaphore ||
|
eType == ELoopSource::eSourceFastSemaphore ||
|
||||||
eType == ELoopSource::eSourceEvent)
|
eType == ELoopSource::eSourceFastEvent)
|
||||||
{
|
{
|
||||||
if (pLoopSource->IsSignaledNoSpinIfUserland())
|
if (pLoopSource->IsSignaledNoSpinIfUserland())
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user