]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/boost/asio/detail/thread.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / asio / detail / thread.hpp
1 //
2 // detail/thread.hpp
3 // ~~~~~~~~~~~~~~~~~
4 //
5 // Copyright (c) 2003-2020 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_THREAD_HPP
12 #define BOOST_ASIO_DETAIL_THREAD_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 # include <boost/asio/detail/null_thread.hpp>
22 #elif defined(BOOST_ASIO_HAS_PTHREADS)
23 # include <boost/asio/detail/posix_thread.hpp>
24 #elif defined(BOOST_ASIO_WINDOWS)
25 # if defined(UNDER_CE)
26 # include <boost/asio/detail/wince_thread.hpp>
27 # elif defined(BOOST_ASIO_WINDOWS_APP)
28 # include <boost/asio/detail/winapp_thread.hpp>
29 # else
30 # include <boost/asio/detail/win_thread.hpp>
31 # endif
32 #elif defined(BOOST_ASIO_HAS_STD_THREAD)
33 # include <boost/asio/detail/std_thread.hpp>
34 #else
35 # error Only Windows, POSIX and std::thread are supported!
36 #endif
37
38 namespace boost {
39 namespace asio {
40 namespace detail {
41
42 #if !defined(BOOST_ASIO_HAS_THREADS)
43 typedef null_thread thread;
44 #elif defined(BOOST_ASIO_HAS_PTHREADS)
45 typedef posix_thread thread;
46 #elif defined(BOOST_ASIO_WINDOWS)
47 # if defined(UNDER_CE)
48 typedef wince_thread thread;
49 # elif defined(BOOST_ASIO_WINDOWS_APP)
50 typedef winapp_thread thread;
51 # else
52 typedef win_thread thread;
53 # endif
54 #elif defined(BOOST_ASIO_HAS_STD_THREAD)
55 typedef std_thread thread;
56 #endif
57
58 } // namespace detail
59 } // namespace asio
60 } // namespace boost
61
62 #endif // BOOST_ASIO_DETAIL_THREAD_HPP