select_interrupter.hpp 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // select_interrupter.hpp
  3. // ~~~~~~~~~~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2008 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/push_options.hpp>
  16. #include <boost/asio/detail/push_options.hpp>
  17. #include <boost/config.hpp>
  18. #include <boost/asio/detail/pop_options.hpp>
  19. #include <boost/asio/detail/eventfd_select_interrupter.hpp>
  20. #include <boost/asio/detail/pipe_select_interrupter.hpp>
  21. #include <boost/asio/detail/socket_select_interrupter.hpp>
  22. namespace boost {
  23. namespace asio {
  24. namespace detail {
  25. #if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
  26. typedef socket_select_interrupter select_interrupter;
  27. #elif defined(BOOST_ASIO_HAS_EVENTFD)
  28. typedef eventfd_select_interrupter select_interrupter;
  29. #else
  30. typedef pipe_select_interrupter select_interrupter;
  31. #endif
  32. } // namespace detail
  33. } // namespace asio
  34. } // namespace boost
  35. #include <boost/asio/detail/pop_options.hpp>
  36. #endif // BOOST_ASIO_DETAIL_SELECT_INTERRUPTER_HPP