From 8f10f2035967fa704edbef1135caa3a796d2bd25 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Sat, 30 Aug 2014 14:09:18 +0400 Subject: [PATCH] Use #pragma intrinsic only with MSVC. --- include/boost/atomic/detail/pause.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/atomic/detail/pause.hpp b/include/boost/atomic/detail/pause.hpp index 15d7a02..37aa5ca 100644 --- a/include/boost/atomic/detail/pause.hpp +++ b/include/boost/atomic/detail/pause.hpp @@ -18,8 +18,10 @@ #if defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_IX86)) extern "C" void _mm_pause(void); +#if defined(BOOST_MSVC) #pragma intrinsic(_mm_pause) #endif +#endif namespace boost { namespace atomics { @@ -29,10 +31,8 @@ BOOST_FORCEINLINE void pause() BOOST_NOEXCEPT { #if defined(_MSC_VER) && (defined(_M_AMD64) || defined(_M_IX86)) _mm_pause(); - #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) __asm__ __volatile__("pause;"); - #endif }