diff --git a/api/include/opentelemetry/common/spin_lock_mutex.h b/api/include/opentelemetry/common/spin_lock_mutex.h index b35f54081a..d38d5791d5 100644 --- a/api/include/opentelemetry/common/spin_lock_mutex.h +++ b/api/include/opentelemetry/common/spin_lock_mutex.h @@ -101,9 +101,7 @@ class SpinLockMutex __builtin_ia32_pause(); # endif #elif defined(__arm__) - // This intrinsic should fail to be found if YIELD is not supported on the current - // processor. - __yield(); + __asm__ volatile("yield" ::: "memory"); #else // TODO: Issue PAGE/YIELD on other architectures. #endif diff --git a/api/test/common/spinlock_benchmark.cc b/api/test/common/spinlock_benchmark.cc index 28692bee56..07579579c7 100644 --- a/api/test/common/spinlock_benchmark.cc +++ b/api/test/common/spinlock_benchmark.cc @@ -93,7 +93,7 @@ static void BM_ProcYieldSpinLockThrashing(benchmark::State &s) __builtin_ia32_pause(); # endif #elif defined(__arm__) - __yield(); + __asm__ volatile("yield" ::: "memory"); #endif } },