1 // 2 // detail/thread.hpp 3 // ~~~~~~~~~~~~~~~~~ 4 // 5 // Copyright (c) 2003-2019 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_WINDOWS) 23 # if defined(UNDER_CE) 24 # include <boost/asio/detail/wince_thread.hpp> 25 # elif defined(BOOST_ASIO_WINDOWS_APP) 26 # include <boost/asio/detail/winapp_thread.hpp> 27 # else 28 # include <boost/asio/detail/win_thread.hpp> 29 # endif 30 #elif defined(BOOST_ASIO_HAS_PTHREADS) 31 # include <boost/asio/detail/posix_thread.hpp> 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_WINDOWS) 45 # if defined(UNDER_CE) 46 typedef wince_thread thread; 47 # elif defined(BOOST_ASIO_WINDOWS_APP) 48 typedef winapp_thread thread; 49 # else 50 typedef win_thread thread; 51 # endif 52 #elif defined(BOOST_ASIO_HAS_PTHREADS) 53 typedef posix_thread thread; 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 63