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) 2011 Helge Bahmann
|
Chris@102
|
7 * Copyright (c) 2013 Tim Blechmann
|
Chris@102
|
8 * Copyright (c) 2014 Andrey Semashev
|
Chris@102
|
9 */
|
Chris@102
|
10 /*!
|
Chris@102
|
11 * \file atomic/detail/caps_gcc_sync.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_SYNC_HPP_INCLUDED_
|
Chris@102
|
17 #define BOOST_ATOMIC_DETAIL_CAPS_GCC_SYNC_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__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)
|
Chris@102
|
26 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG8B 1
|
Chris@102
|
27 #endif
|
Chris@102
|
28
|
Chris@102
|
29 #if defined(__x86_64__) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
Chris@102
|
30 #define BOOST_ATOMIC_DETAIL_X86_HAS_CMPXCHG16B 1
|
Chris@102
|
31 #endif
|
Chris@102
|
32
|
Chris@102
|
33 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1)\
|
Chris@102
|
34 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2)\
|
Chris@102
|
35 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)\
|
Chris@102
|
36 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\
|
Chris@102
|
37 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
Chris@102
|
38 #define BOOST_ATOMIC_INT8_LOCK_FREE 2
|
Chris@102
|
39 #endif
|
Chris@102
|
40 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2)\
|
Chris@102
|
41 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)\
|
Chris@102
|
42 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\
|
Chris@102
|
43 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
Chris@102
|
44 #define BOOST_ATOMIC_INT16_LOCK_FREE 2
|
Chris@102
|
45 #endif
|
Chris@102
|
46 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)\
|
Chris@102
|
47 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\
|
Chris@102
|
48 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
Chris@102
|
49 #define BOOST_ATOMIC_INT32_LOCK_FREE 2
|
Chris@102
|
50 #endif
|
Chris@102
|
51 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8)\
|
Chris@102
|
52 || defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
Chris@102
|
53 #define BOOST_ATOMIC_INT64_LOCK_FREE 2
|
Chris@102
|
54 #endif
|
Chris@102
|
55 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
|
Chris@102
|
56 #define BOOST_ATOMIC_INT128_LOCK_FREE 2
|
Chris@102
|
57 #endif
|
Chris@102
|
58
|
Chris@102
|
59 #define BOOST_ATOMIC_THREAD_FENCE 2
|
Chris@102
|
60 #define BOOST_ATOMIC_SIGNAL_FENCE 2
|
Chris@102
|
61
|
Chris@102
|
62 #endif // BOOST_ATOMIC_DETAIL_CAPS_GCC_SYNC_HPP_INCLUDED_
|