[*] SMT Yield: minor branch added to SMT Yield
This commit is contained in:
parent
88355932c1
commit
dfe44317a0
@ -81,6 +81,8 @@ namespace Aurora::Threading::Primitives
|
||||
gUseFutexRWLock = ThrdCfg::gPreferFutexRWLock &&
|
||||
IsWaitOnRecommended();
|
||||
|
||||
gSpinAdaptiveThreadCount = uCores;
|
||||
|
||||
if (uCores == 1)
|
||||
{
|
||||
gSpinAdaptiveThreshold = 0;
|
||||
|
@ -54,6 +54,7 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
inline AuUInt32 gSpinAdaptiveThreshold {};
|
||||
inline AuUInt32 gSpinAdaptiveCurrentCount {};
|
||||
inline AuUInt32 gSpinAdaptiveThreadCount {};
|
||||
|
||||
inline AuUInt32 gUseFutexRWLock {};
|
||||
|
||||
@ -144,7 +145,7 @@ namespace Aurora::Threading::Primitives
|
||||
|
||||
AuAtomicSub(&gSpinAdaptiveCurrentCount, 1u);
|
||||
}
|
||||
else
|
||||
else if (uNow <= gSpinAdaptiveThreadCount)
|
||||
{
|
||||
auto uCount = (spin) / 3;
|
||||
#if defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)
|
||||
|
Loading…
Reference in New Issue
Block a user