Chris@16: #ifndef BOOST_ATOMIC_DETAIL_PLATFORM_HPP Chris@16: #define BOOST_ATOMIC_DETAIL_PLATFORM_HPP Chris@16: Chris@16: // Copyright (c) 2009 Helge Bahmann Chris@16: // Chris@16: // Distributed under the Boost Software License, Version 1.0. Chris@16: // See accompanying file LICENSE_1_0.txt or copy at Chris@16: // http://www.boost.org/LICENSE_1_0.txt) Chris@16: Chris@16: // Platform selection file Chris@16: Chris@16: #include Chris@16: Chris@16: #ifdef BOOST_HAS_PRAGMA_ONCE Chris@16: #pragma once Chris@16: #endif Chris@16: Chris@16: // Intel compiler does not support __atomic* intrinsics properly, although defines them (tested with 13.0.1 and 13.1.1 on Linux) Chris@16: #if (defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) && !defined(BOOST_INTEL_CXX_VERSION))\ Chris@16: || (defined(BOOST_CLANG) && ((__clang_major__ * 100 + __clang_minor__) >= 302)) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif 0 && defined(__GNUC__) && defined(__alpha__) /* currently does not work correctly */ Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #elif defined(__GNUC__) && (defined(__POWERPC__) || defined(__PPC__)) Chris@16: Chris@16: #include Chris@16: Chris@16: // This list of ARM architecture versions comes from Apple's arm/arch.h header. Chris@16: // I don't know how complete it is. Chris@16: #elif defined(__GNUC__) && (defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \ Chris@16: || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) \ Chris@16: || defined(__ARM_ARCH_6K__) \ Chris@16: || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \ Chris@16: || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \ Chris@16: || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7S__)) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif defined(__linux__) && defined(__arm__) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif defined(__GNUC__) && defined(__sparc_v9__) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif defined(BOOST_WINDOWS) || defined(_WIN32_CE) Chris@16: Chris@16: #include Chris@16: Chris@16: #elif 0 && defined(__GNUC__) /* currently does not work correctly */ Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #else Chris@16: Chris@16: #include Chris@16: Chris@16: #endif Chris@16: Chris@16: #endif