Chris@102
|
1 /*
|
Chris@102
|
2 * Distributed under the Boost Software License, Version 1.0.
|
Chris@102
|
3 * (See accompanying file LICENSE_1_0.txt or copy at
|
Chris@102
|
4 * http://www.boost.org/LICENSE_1_0.txt)
|
Chris@102
|
5 *
|
Chris@102
|
6 * Copyright (c) 2009 Helge Bahmann
|
Chris@102
|
7 * Copyright (c) 2012 Tim Blechmann
|
Chris@102
|
8 * Copyright (c) 2013 - 2014 Andrey Semashev
|
Chris@102
|
9 */
|
Chris@102
|
10 /*!
|
Chris@102
|
11 * \file atomic/detail/caps_gcc_x86.hpp
|
Chris@102
|
12 *
|
Chris@102
|
13 * This header defines feature capabilities macros
|
Chris@102
|
14 */
|
Chris@102
|
15
|
Chris@102
|
16 #ifndef BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_
|
Chris@102
|
17 #define BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_
|
Chris@102
|
18
|
Chris@102
|
19 #include <boost/atomic/detail/config.hpp>
|
Chris@102
|
20
|
Chris@102
|
21 #ifdef BOOST_HAS_PRAGMA_ONCE
|
Chris@102
|
22 #pragma once
|
Chris@102
|
23 #endif
|
Chris@102
|
24
|
Chris@102
|
25 #if defined(__i386__) &&\
|
Chris@102
|
26 (\
|
Chris@102
|
27 defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8) ||\
|
Chris@102
|
28 defined(__i586__) || defined(__i686__) || defined(__pentium4__) || defined(__nocona__) || defined(__core2__) || defined(__corei7__) ||\
|
Chris@102
|
29 defined(__k6__) || defined(__athlon__) || defined(__k8__) || defined(__amdfam10__) || defined(__bdver1__) || defined(__bdver2__) || defined(__bdver3__) || defined(__btver1__) || defined(__btver2__)\
|
Chris@102
|
30 )
|
Chris@102
|
31 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1
|
Chris@102
|
32 #endif
|
Chris@102
|
33
|
Chris@102
|
34 #if defined(__x86_64__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
Chris@102
|
35 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
|
Chris@102
|
36 #endif
|
Chris@102
|
37
|
Chris@102
|
38 #define BOOST_ATOMIC_INT8_LOCK_FREE 2
|
Chris@102
|
39 #define BOOST_ATOMIC_INT16_LOCK_FREE 2
|
Chris@102
|
40 #define BOOST_ATOMIC_INT32_LOCK_FREE 2
|
Chris@102
|
41 #if defined(__x86_64__) || defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B)
|
Chris@102
|
42 #define BOOST_ATOMIC_INT64_LOCK_FREE 2
|
Chris@102
|
43 #endif
|
Chris@102
|
44 #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B) && (defined(BOOST_HAS_INT128) || !defined(BOOST_NO_ALIGNMENT))
|
Chris@102
|
45 #define BOOST_ATOMIC_INT128_LOCK_FREE 2
|
Chris@102
|
46 #endif
|
Chris@102
|
47 #define BOOST_ATOMIC_POINTER_LOCK_FREE 2
|
Chris@102
|
48
|
Chris@102
|
49 #define BOOST_ATOMIC_THREAD_FENCE 2
|
Chris@102
|
50 #define BOOST_ATOMIC_SIGNAL_FENCE 2
|
Chris@102
|
51
|
Chris@102
|
52 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_X86_HPP_INCLUDED_
|