diff --git a/api/include/opentelemetry/common/spin_lock_mutex.h b/api/include/opentelemetry/common/spin_lock_mutex.h index 764b5fc6b8..1877c8eb40 100644 --- a/api/include/opentelemetry/common/spin_lock_mutex.h +++ b/api/include/opentelemetry/common/spin_lock_mutex.h @@ -18,6 +18,8 @@ #elif defined(__i386__) || defined(__x86_64__) # if defined(__clang__) # include +# elif defined(__INTEL_COMPILER) +# include # endif #endif @@ -65,7 +67,7 @@ class SpinLockMutex #if defined(_MSC_VER) YieldProcessor(); #elif defined(__i386__) || defined(__x86_64__) -# if defined(__clang__) +# if defined(__clang__) || defined(__INTEL_COMPILER) _mm_pause(); # else __builtin_ia32_pause(); diff --git a/api/test/common/spinlock_benchmark.cc b/api/test/common/spinlock_benchmark.cc index 50a8bade73..53ea633d16 100644 --- a/api/test/common/spinlock_benchmark.cc +++ b/api/test/common/spinlock_benchmark.cc @@ -87,7 +87,7 @@ static void BM_ProcYieldSpinLockThrashing(benchmark::State &s) #if defined(_MSC_VER) YieldProcessor(); #elif defined(__i386__) || defined(__x86_64__) -# if defined(__clang__) +# if defined(__clang__) || defined(__INTEL_COMPILER) _mm_pause(); # else __builtin_ia32_pause();