ARM: Use ISB instead of yield in place of x86 pause
ISB isn't an exact match for pause, but it does slow down execution at least a litle. Unfortunately, yield does nothing on machines without SMT (99% of aarch64 machines)
This commit is contained in:
+1
-1
@@ -175,7 +175,7 @@ namespace utils
|
|||||||
inline void pause()
|
inline void pause()
|
||||||
{
|
{
|
||||||
#if defined(ARCH_ARM64)
|
#if defined(ARCH_ARM64)
|
||||||
__asm__ volatile("yield");
|
__asm__ volatile("isb" ::: "memory");
|
||||||
#elif defined(ARCH_X64)
|
#elif defined(ARCH_X64)
|
||||||
_mm_pause();
|
_mm_pause();
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user