[*] Format SMT spin

This commit is contained in:
Reece Wilson 2023-08-20 09:50:41 +01:00
parent f1a08d25e7
commit 71617ca66e
2 changed files with 4 additions and 5 deletions

View File

@ -23,7 +23,7 @@ namespace Aurora::Threading
AUKN_SYM void SetThreadLocalAdditionalSpinCountTimeout(AuUInt8 uTimeout)
{
gHasThreadLocalTimeout = 1;
tlSpinCountLocal = uTimeout;
tlsSpinCountLocal = uTimeout;
}
AUKN_SYM AuUInt32 GetTotalSpinCountTimeout()
@ -32,11 +32,10 @@ namespace Aurora::Threading
uCount = 1u << AuUInt32(gRuntimeConfig.threadingConfig.uSpinLoopPowerA);
if (gHasThreadLocalTimeout)
{
uCount += 1u << AuUInt32(tlSpinCountLocal);
uCount += 1u << AuUInt32(tlsSpinCountLocal);
}
return uCount;
}
}
namespace Aurora::Threading::Primitives

View File

@ -10,7 +10,7 @@
namespace Aurora::Threading
{
inline AuUInt32 gHasThreadLocalTimeout {};
inline thread_local AuUInt8 tlSpinCountLocal {};
inline thread_local AuUInt8 tlsSpinCountLocal {};
}
namespace Aurora::Threading::Primitives
@ -54,7 +54,7 @@ namespace Aurora::Threading::Primitives
if (gHasThreadLocalTimeout)
{
auto uCount = tlSpinCountLocal;
auto uCount = tlsSpinCountLocal;
int loops = (1 << uCount);
while (loops > 0)