diff options
author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) |
commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp | |
parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
download | swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp | 50 |
1 files changed, 33 insertions, 17 deletions
diff --git a/3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp b/3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp index 5efb24b..10b2f3f 100644 --- a/3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp +++ b/3rdParty/Boost/src/boost/asio/detail/reactive_descriptor_service.hpp @@ -2,7 +2,7 @@ // detail/reactive_descriptor_service.hpp // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // -// 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) @@ -17,11 +17,13 @@ #include <boost/asio/detail/config.hpp> -#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) +#if !defined(BOOST_ASIO_WINDOWS) \ + && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \ + && !defined(__CYGWIN__) -#include <boost/utility/addressof.hpp> #include <boost/asio/buffer.hpp> #include <boost/asio/io_service.hpp> +#include <boost/asio/detail/addressof.hpp> #include <boost/asio/detail/bind_handler.hpp> #include <boost/asio/detail/buffer_sequence_adapter.hpp> #include <boost/asio/detail/descriptor_ops.hpp> @@ -186,18 +188,21 @@ public: // lifetime of the asynchronous operation. template <typename ConstBufferSequence, typename Handler> void async_write_some(implementation_type& impl, - const ConstBufferSequence& buffers, Handler handler) + const ConstBufferSequence& buffers, Handler& handler) { + bool is_continuation = + boost_asio_handler_cont_helpers::is_continuation(handler); + // Allocate and construct an operation to wrap the handler. typedef descriptor_write_op<ConstBufferSequence, Handler> op; - typename op::ptr p = { boost::addressof(handler), + typename op::ptr p = { boost::asio::detail::addressof(handler), boost_asio_handler_alloc_helpers::allocate( sizeof(op), handler), 0 }; p.p = new (p.v) op(impl.descriptor_, buffers, handler); BOOST_ASIO_HANDLER_CREATION((p.p, "descriptor", &impl, "async_write_some")); - start_op(impl, reactor::write_op, p.p, true, + start_op(impl, reactor::write_op, p.p, is_continuation, true, buffer_sequence_adapter<boost::asio::const_buffer, ConstBufferSequence>::all_empty(buffers)); p.v = p.p = 0; @@ -206,11 +211,14 @@ public: // Start an asynchronous wait until data can be written without blocking. template <typename Handler> void async_write_some(implementation_type& impl, - const null_buffers&, Handler handler) + const null_buffers&, Handler& handler) { + bool is_continuation = + boost_asio_handler_cont_helpers::is_continuation(handler); + // Allocate and construct an operation to wrap the handler. typedef reactive_null_buffers_op<Handler> op; - typename op::ptr p = { boost::addressof(handler), + typename op::ptr p = { boost::asio::detail::addressof(handler), boost_asio_handler_alloc_helpers::allocate( sizeof(op), handler), 0 }; p.p = new (p.v) op(handler); @@ -218,7 +226,7 @@ public: BOOST_ASIO_HANDLER_CREATION((p.p, "descriptor", &impl, "async_write_some(null_buffers)")); - start_op(impl, reactor::write_op, p.p, false, false); + start_op(impl, reactor::write_op, p.p, is_continuation, false, false); p.v = p.p = 0; } @@ -248,18 +256,21 @@ public: // valid for the lifetime of the asynchronous operation. template <typename MutableBufferSequence, typename Handler> void async_read_some(implementation_type& impl, - const MutableBufferSequence& buffers, Handler handler) + const MutableBufferSequence& buffers, Handler& handler) { + bool is_continuation = + boost_asio_handler_cont_helpers::is_continuation(handler); + // Allocate and construct an operation to wrap the handler. typedef descriptor_read_op<MutableBufferSequence, Handler> op; - typename op::ptr p = { boost::addressof(handler), + typename op::ptr p = { boost::asio::detail::addressof(handler), boost_asio_handler_alloc_helpers::allocate( sizeof(op), handler), 0 }; p.p = new (p.v) op(impl.descriptor_, buffers, handler); BOOST_ASIO_HANDLER_CREATION((p.p, "descriptor", &impl, "async_read_some")); - start_op(impl, reactor::read_op, p.p, true, + start_op(impl, reactor::read_op, p.p, is_continuation, true, buffer_sequence_adapter<boost::asio::mutable_buffer, MutableBufferSequence>::all_empty(buffers)); p.v = p.p = 0; @@ -268,11 +279,14 @@ public: // Wait until data can be read without blocking. template <typename Handler> void async_read_some(implementation_type& impl, - const null_buffers&, Handler handler) + const null_buffers&, Handler& handler) { + bool is_continuation = + boost_asio_handler_cont_helpers::is_continuation(handler); + // Allocate and construct an operation to wrap the handler. typedef reactive_null_buffers_op<Handler> op; - typename op::ptr p = { boost::addressof(handler), + typename op::ptr p = { boost::asio::detail::addressof(handler), boost_asio_handler_alloc_helpers::allocate( sizeof(op), handler), 0 }; p.p = new (p.v) op(handler); @@ -280,14 +294,14 @@ public: BOOST_ASIO_HANDLER_CREATION((p.p, "descriptor", &impl, "async_read_some(null_buffers)")); - start_op(impl, reactor::read_op, p.p, false, false); + start_op(impl, reactor::read_op, p.p, is_continuation, false, false); p.v = p.p = 0; } private: // Start the asynchronous operation. BOOST_ASIO_DECL void start_op(implementation_type& impl, int op_type, - reactor_op* op, bool is_non_blocking, bool noop); + reactor_op* op, bool is_continuation, bool is_non_blocking, bool noop); // The selector that performs event demultiplexing for the service. reactor& reactor_; @@ -303,6 +317,8 @@ private: # include <boost/asio/detail/impl/reactive_descriptor_service.ipp> #endif // defined(BOOST_ASIO_HEADER_ONLY) -#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__) +#endif // !defined(BOOST_ASIO_WINDOWS) + // && !defined(BOOST_ASIO_WINDOWS_RUNTIME) + // && !defined(__CYGWIN__) #endif // BOOST_ASIO_DETAIL_REACTIVE_DESCRIPTOR_SERVICE_HPP |