summaryrefslogtreecommitdiff
path: root/boost/asio/detail/impl/select_reactor.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/asio/detail/impl/select_reactor.ipp')
-rw-r--r--boost/asio/detail/impl/select_reactor.ipp33
1 files changed, 17 insertions, 16 deletions
diff --git a/boost/asio/detail/impl/select_reactor.ipp b/boost/asio/detail/impl/select_reactor.ipp
index d11904e40d..c8e04a26d4 100644
--- a/boost/asio/detail/impl/select_reactor.ipp
+++ b/boost/asio/detail/impl/select_reactor.ipp
@@ -2,7 +2,7 @@
// detail/impl/select_reactor.ipp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -20,7 +20,8 @@
#if defined(BOOST_ASIO_HAS_IOCP) \
|| (!defined(BOOST_ASIO_HAS_DEV_POLL) \
&& !defined(BOOST_ASIO_HAS_EPOLL) \
- && !defined(BOOST_ASIO_HAS_KQUEUE))
+ && !defined(BOOST_ASIO_HAS_KQUEUE) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
#include <boost/asio/detail/bind_handler.hpp>
#include <boost/asio/detail/fd_set_adapter.hpp>
@@ -122,13 +123,14 @@ void select_reactor::move_descriptor(socket_type,
}
void select_reactor::start_op(int op_type, socket_type descriptor,
- select_reactor::per_descriptor_data&, reactor_op* op, bool)
+ select_reactor::per_descriptor_data&, reactor_op* op,
+ bool is_continuation, bool)
{
boost::asio::detail::mutex::scoped_lock lock(mutex_);
if (shutdown_)
{
- post_immediate_completion(op);
+ post_immediate_completion(op, is_continuation);
return;
}
@@ -180,21 +182,21 @@ void select_reactor::run(bool block, op_queue<operation>& ops)
for (int i = 0; i < max_select_ops; ++i)
{
have_work_to_do = have_work_to_do || !op_queue_[i].empty();
- op_queue_[i].get_descriptors(fd_sets_[i], ops);
+ fd_sets_[i].set(op_queue_[i], ops);
if (fd_sets_[i].max_descriptor() > max_fd)
max_fd = fd_sets_[i].max_descriptor();
}
-#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
// Connection operations on Windows use both except and write fd_sets.
have_work_to_do = have_work_to_do || !op_queue_[connect_op].empty();
- op_queue_[connect_op].get_descriptors(fd_sets_[write_op], ops);
+ fd_sets_[write_op].set(op_queue_[connect_op], ops);
if (fd_sets_[write_op].max_descriptor() > max_fd)
max_fd = fd_sets_[write_op].max_descriptor();
- op_queue_[connect_op].get_descriptors(fd_sets_[except_op], ops);
+ fd_sets_[except_op].set(op_queue_[connect_op], ops);
if (fd_sets_[except_op].max_descriptor() > max_fd)
max_fd = fd_sets_[except_op].max_descriptor();
-#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
// We can return immediately if there's no work to do and the reactor is
// not supposed to block.
@@ -224,18 +226,16 @@ void select_reactor::run(bool block, op_queue<operation>& ops)
// Dispatch all ready operations.
if (retval > 0)
{
-#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
// Connection operations on Windows use both except and write fd_sets.
- op_queue_[connect_op].perform_operations_for_descriptors(
- fd_sets_[except_op], ops);
- op_queue_[connect_op].perform_operations_for_descriptors(
- fd_sets_[write_op], ops);
-#endif // defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+ fd_sets_[except_op].perform(op_queue_[connect_op], ops);
+ fd_sets_[write_op].perform(op_queue_[connect_op], ops);
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
// Exception operations must be processed first to ensure that any
// out-of-band data is read before normal data.
for (int i = max_select_ops - 1; i >= 0; --i)
- op_queue_[i].perform_operations_for_descriptors(fd_sets_[i], ops);
+ fd_sets_[i].perform(op_queue_[i], ops);
}
timer_queues_.get_ready_timers(ops);
}
@@ -310,5 +310,6 @@ void select_reactor::cancel_ops_unlocked(socket_type descriptor,
// || (!defined(BOOST_ASIO_HAS_DEV_POLL)
// && !defined(BOOST_ASIO_HAS_EPOLL)
// && !defined(BOOST_ASIO_HAS_KQUEUE))
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME))
#endif // BOOST_ASIO_DETAIL_IMPL_SELECT_REACTOR_IPP