[*] Format SMT spin
This commit is contained in:
parent
f1a08d25e7
commit
71617ca66e
@ -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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user