Chris@102: /* Chris@102: * Distributed under the Boost Software License, Version 1.0. Chris@102: * (See accompanying file LICENSE_1_0.txt or copy at Chris@102: * http://www.boost.org/LICENSE_1_0.txt) Chris@102: * Chris@102: * Copyright (c) 2009 Helge Bahmann Chris@102: * Copyright (c) 2012 Tim Blechmann Chris@102: * Copyright (c) 2013 - 2014 Andrey Semashev Chris@102: */ Chris@102: /*! Chris@102: * \file atomic/detail/caps_gcc_x86.hpp Chris@102: * Chris@102: * This header defines feature capabilities macros Chris@102: */ Chris@102: Chris@102: #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_ Chris@102: #define BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_ Chris@102: Chris@102: #include Chris@102: Chris@102: #ifdef BOOST_HAS_PRAGMA_ONCE Chris@102: #pragma once Chris@102: #endif Chris@102: Chris@102: #if defined(__i386__) &&\ Chris@102: (\ Chris@102: defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) ||\ Chris@102: defined(__i586__) || defined(__i686__) || defined(__pentium4__) || defined(__nocona__) || defined(__core2__) || defined(__corei7__) ||\ Chris@102: defined(__k6__) || defined(__athlon__) || defined(__k8__) || defined(__amdfam10__) || defined(__bdver1__) || defined(__bdver2__) || defined(__bdver3__) || defined(__btver1__) || defined(__btver2__)\ Chris@102: ) Chris@102: #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1 Chris@102: #endif Chris@102: Chris@102: #if defined(__x86_64__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) Chris@102: #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1 Chris@102: #endif Chris@102: Chris@102: #define BOOST_ATOMIC_INT8_LOCK_FREE 2 Chris@102: #define BOOST_ATOMIC_INT16_LOCK_FREE 2 Chris@102: #define BOOST_ATOMIC_INT32_LOCK_FREE 2 Chris@102: #if defined(__x86_64__) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B) Chris@102: #define BOOST_ATOMIC_INT64_LOCK_FREE 2 Chris@102: #endif Chris@102: #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT)) Chris@102: #define BOOST_ATOMIC_INT128_LOCK_FREE 2 Chris@102: #endif Chris@102: #define BOOST_ATOMIC_POINTER_LOCK_FREE 2 Chris@102: Chris@102: #define BOOST_ATOMIC_THREAD_FENCE 2 Chris@102: #define BOOST_ATOMIC_SIGNAL_FENCE 2 Chris@102: Chris@102: #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_