]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/asio/include/boost/asio/detail/fenced_block.hpp
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / boost / libs / asio / include / boost / asio / detail / fenced_block.hpp
1 //
2 // detail/fenced_block.hpp
3 // ~~~~~~~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10
11 #ifndef BOOST_ASIO_DETAIL_FENCED_BLOCK_HPP
12 #define BOOST_ASIO_DETAIL_FENCED_BLOCK_HPP
13
14 #if defined(_MSC_VER) && (_MSC_VER >= 1200)
15 # pragma once
16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
17
18 #include <boost/asio/detail/config.hpp>
19
20 #if !defined(BOOST_ASIO_HAS_THREADS) \
21 || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK)
22 # include <boost/asio/detail/null_fenced_block.hpp>
23 #elif defined(__MACH__) && defined(__APPLE__)
24 # include <boost/asio/detail/macos_fenced_block.hpp>
25 #elif defined(__sun)
26 # include <boost/asio/detail/solaris_fenced_block.hpp>
27 #elif defined(__GNUC__) && defined(__arm__) \
28 && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
29 # include <boost/asio/detail/gcc_arm_fenced_block.hpp>
30 #elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
31 # include <boost/asio/detail/gcc_hppa_fenced_block.hpp>
32 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
33 # include <boost/asio/detail/gcc_x86_fenced_block.hpp>
34 #elif defined(__GNUC__) \
35 && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
36 && !defined(__INTEL_COMPILER) && !defined(__ICL) \
37 && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
38 # include <boost/asio/detail/gcc_sync_fenced_block.hpp>
39 #elif defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
40 # include <boost/asio/detail/win_fenced_block.hpp>
41 #else
42 # include <boost/asio/detail/null_fenced_block.hpp>
43 #endif
44
45 namespace boost {
46 namespace asio {
47 namespace detail {
48
49 #if !defined(BOOST_ASIO_HAS_THREADS) \
50 || defined(BOOST_ASIO_DISABLE_FENCED_BLOCK)
51 typedef null_fenced_block fenced_block;
52 #elif defined(__MACH__) && defined(__APPLE__)
53 typedef macos_fenced_block fenced_block;
54 #elif defined(__sun)
55 typedef solaris_fenced_block fenced_block;
56 #elif defined(__GNUC__) && defined(__arm__) \
57 && !defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4)
58 typedef gcc_arm_fenced_block fenced_block;
59 #elif defined(__GNUC__) && (defined(__hppa) || defined(__hppa__))
60 typedef gcc_hppa_fenced_block fenced_block;
61 #elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
62 typedef gcc_x86_fenced_block fenced_block;
63 #elif defined(__GNUC__) \
64 && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)) \
65 && !defined(__INTEL_COMPILER) && !defined(__ICL) \
66 && !defined(__ICC) && !defined(__ECC) && !defined(__PATHSCALE__)
67 typedef gcc_sync_fenced_block fenced_block;
68 #elif defined(BOOST_ASIO_WINDOWS) && !defined(UNDER_CE)
69 typedef win_fenced_block fenced_block;
70 #else
71 typedef null_fenced_block fenced_block;
72 #endif
73
74 } // namespace detail
75 } // namespace asio
76 } // namespace boost
77
78 #endif // BOOST_ASIO_DETAIL_FENCED_BLOCK_HPP