[*] Unify both SMT subloops
This commit is contained in:
parent
d112179c83
commit
f53508baa9
@ -86,7 +86,12 @@ namespace Aurora::Threading::Primitives
|
||||
if (gHasThreadLocalTimeout)
|
||||
{
|
||||
int loops = (1 << tlsSpinCountLocal);
|
||||
#if defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)
|
||||
auto perfCounter = __rdtsc() + loops;
|
||||
while (__rdtsc() < perfCounter)
|
||||
#else
|
||||
while (loops > 0)
|
||||
#endif
|
||||
{
|
||||
if (callback())
|
||||
{
|
||||
@ -162,7 +167,12 @@ namespace Aurora::Threading::Primitives
|
||||
auto uCount = tlsSpinCountLocal;
|
||||
|
||||
int loops = (1 << uCount);
|
||||
#if defined(AURORA_ARCH_X64) || defined(AURORA_ARCH_X86)
|
||||
auto perfCounter = __rdtsc() + loops;
|
||||
while (__rdtsc() < perfCounter)
|
||||
#else
|
||||
while (loops > 0)
|
||||
#endif
|
||||
{
|
||||
if (callback())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user