[*] Unify both SMT subloops

This commit is contained in:
Reece Wilson 2023-09-04 23:03:08 +01:00
parent d112179c83
commit f53508baa9

View File

@ -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())
{