diff --git a/libc/src/__support/RPC/rpc_util.h b/libc/src/__support/RPC/rpc_util.h --- a/libc/src/__support/RPC/rpc_util.h +++ b/libc/src/__support/RPC/rpc_util.h @@ -12,8 +12,13 @@ #include "src/__support/CPP/type_traits.h" #include "src/__support/GPU/utils.h" #include "src/__support/macros/attributes.h" +#include "src/__support/macros/config.h" #include "src/__support/macros/properties/architectures.h" +#ifdef LIBC_TARGET_ARCH_IS_X86 +#include +#endif + namespace __llvm_libc { namespace rpc { @@ -26,6 +31,8 @@ LIBC_INLINE_ASM("nanosleep.u32 64;" ::: "memory"); #elif defined(LIBC_TARGET_ARCH_IS_AMDGPU) __builtin_amdgcn_s_sleep(2); +#elif defined(LIBC_TARGET_ARCH_IS_X86) + _mm_pause(); #else // Simply do nothing if sleeping isn't supported on this platform. #endif