select_interrupter.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //
  2. // detail/select_interrupter.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2018 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. #ifndef BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_HPP
  11. #define BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/config.hpp>
  16. #if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
  17. #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
  18. # include <boost/asio/detail/socket_select_interrupter.hpp>
  19. #elif defined(BOOST_ASIO_HAS_EVENTFD)
  20. # include <boost/asio/detail/eventfd_select_interrupter.hpp>
  21. #else
  22. # include <boost/asio/detail/pipe_select_interrupter.hpp>
  23. #endif
  24. namespace boost {
  25. namespace asio {
  26. namespace detail {
  27. #if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) || defined(__SYMBIAN32__)
  28. typedef socket_select_interrupter select_interrupter;
  29. #elif defined(BOOST_ASIO_HAS_EVENTFD)
  30. typedef eventfd_select_interrupter select_interrupter;
  31. #else
  32. typedef pipe_select_interrupter select_interrupter;
  33. #endif
  34. } // namespace detail
  35. } // namespace asio
  36. } // namespace boost
  37. #endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
  38. #endif // BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_HPP