summaryrefslogtreecommitdiff
path: root/boost/asio/detail/impl/win_object_handle_service.ipp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:11:01 (GMT)
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-12-05 06:11:01 (GMT)
commit3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch)
tree5c1733853892b8397d67706fa453a9bd978d2102 /boost/asio/detail/impl/win_object_handle_service.ipp
parent88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff)
downloadboost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz
boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'boost/asio/detail/impl/win_object_handle_service.ipp')
-rw-r--r--boost/asio/detail/impl/win_object_handle_service.ipp36
1 files changed, 20 insertions, 16 deletions
diff --git a/boost/asio/detail/impl/win_object_handle_service.ipp b/boost/asio/detail/impl/win_object_handle_service.ipp
index a940161..31718a0 100644
--- a/boost/asio/detail/impl/win_object_handle_service.ipp
+++ b/boost/asio/detail/impl/win_object_handle_service.ipp
@@ -29,15 +29,16 @@ namespace asio {
namespace detail {
win_object_handle_service::win_object_handle_service(
- boost::asio::io_service& io_service)
- : io_service_(boost::asio::use_service<io_service_impl>(io_service)),
+ boost::asio::io_context& io_context)
+ : service_base<win_object_handle_service>(io_context),
+ io_context_(boost::asio::use_service<io_context_impl>(io_context)),
mutex_(),
impl_list_(0),
shutdown_(false)
{
}
-void win_object_handle_service::shutdown_service()
+void win_object_handle_service::shutdown()
{
mutex::scoped_lock lock(mutex_);
@@ -52,7 +53,7 @@ void win_object_handle_service::shutdown_service()
lock.unlock();
- io_service_.abandon_operations(ops);
+ io_context_.abandon_operations(ops);
}
void win_object_handle_service::construct(
@@ -178,7 +179,8 @@ void win_object_handle_service::destroy(
if (is_open(impl))
{
- BOOST_ASIO_HANDLER_OPERATION(("object_handle", &impl, "close"));
+ BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
HANDLE wait_handle = impl.wait_handle_;
impl.wait_handle_ = INVALID_HANDLE_VALUE;
@@ -202,7 +204,7 @@ void win_object_handle_service::destroy(
::CloseHandle(impl.handle_);
impl.handle_ = INVALID_HANDLE_VALUE;
- io_service_.post_deferred_completions(ops);
+ io_context_.post_deferred_completions(ops);
}
}
@@ -227,7 +229,8 @@ boost::system::error_code win_object_handle_service::close(
{
if (is_open(impl))
{
- BOOST_ASIO_HANDLER_OPERATION(("object_handle", &impl, "close"));
+ BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "close"));
mutex::scoped_lock lock(mutex_);
@@ -262,7 +265,7 @@ boost::system::error_code win_object_handle_service::close(
boost::asio::error::get_system_category());
}
- io_service_.post_deferred_completions(completed_ops);
+ io_context_.post_deferred_completions(completed_ops);
}
else
{
@@ -278,7 +281,8 @@ boost::system::error_code win_object_handle_service::cancel(
{
if (is_open(impl))
{
- BOOST_ASIO_HANDLER_OPERATION(("object_handle", &impl, "cancel"));
+ BOOST_ASIO_HANDLER_OPERATION((io_context_.context(), "object_handle",
+ &impl, reinterpret_cast<uintmax_t>(impl.wait_handle_), "cancel"));
mutex::scoped_lock lock(mutex_);
@@ -303,7 +307,7 @@ boost::system::error_code win_object_handle_service::cancel(
ec = boost::system::error_code();
- io_service_.post_deferred_completions(completed_ops);
+ io_context_.post_deferred_completions(completed_ops);
}
else
{
@@ -337,7 +341,7 @@ void win_object_handle_service::wait(
void win_object_handle_service::start_wait_op(
win_object_handle_service::implementation_type& impl, wait_op* op)
{
- io_service_.work_started();
+ io_context_.work_started();
if (is_open(impl))
{
@@ -355,13 +359,13 @@ void win_object_handle_service::start_wait_op(
else
{
lock.unlock();
- io_service_.post_deferred_completion(op);
+ io_context_.post_deferred_completion(op);
}
}
else
{
op->ec_ = boost::asio::error::bad_descriptor;
- io_service_.post_deferred_completion(op);
+ io_context_.post_deferred_completion(op);
}
}
@@ -388,7 +392,7 @@ void win_object_handle_service::register_wait_callback(
}
lock.unlock();
- io_service_.post_deferred_completions(completed_ops);
+ io_context_.post_deferred_completions(completed_ops);
}
}
@@ -430,9 +434,9 @@ void win_object_handle_service::wait_callback(PVOID param, BOOLEAN)
}
}
- io_service_impl& ios = impl->owner_->io_service_;
+ io_context_impl& ioc = impl->owner_->io_context_;
lock.unlock();
- ios.post_deferred_completions(completed_ops);
+ ioc.post_deferred_completions(completed_ops);
}
}