From ec7b1726a6d901ac44e2012dc639a53217240a07 Mon Sep 17 00:00:00 2001 From: Richard Dale Date: Tue, 20 May 2014 13:14:53 -0500 Subject: [PATCH] Provide support for the Cray C++ compiler. The Cray compiler defines __GNUC__ and generally supports gnu extensions to C and C++. It does not, however, support inline assembly. The changes here are to avoid inline assembly when _CRAYC is asserted in the preprocessor. --- include/boost/interprocess/detail/atomic.hpp | 2 +- include/boost/interprocess/sync/spin/wait.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/interprocess/detail/atomic.hpp b/include/boost/interprocess/detail/atomic.hpp index fb56891..badaeb0 100644 --- a/include/boost/interprocess/detail/atomic.hpp +++ b/include/boost/interprocess/detail/atomic.hpp @@ -93,7 +93,7 @@ inline boost::uint32_t atomic_cas32 } //namespace interprocess{ } //namespace boost{ -#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) && !defined(_CRAYC) namespace boost { namespace interprocess { diff --git a/include/boost/interprocess/sync/spin/wait.hpp b/include/boost/interprocess/sync/spin/wait.hpp index 6395eed..220699b 100644 --- a/include/boost/interprocess/sync/spin/wait.hpp +++ b/include/boost/interprocess/sync/spin/wait.hpp @@ -37,7 +37,7 @@ extern "C" void _mm_pause(); #define BOOST_INTERPROCESS_SMT_PAUSE _mm_pause(); -#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) ) +#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) ) && !defined(_CRAYC) #define BOOST_INTERPROCESS_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );