From a5c50a4f262f0a880734623f79d4dc2f1aa8a0a2 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 13 Aug 2019 10:29:39 +0200 Subject: Pull in files from odr-mmbtools-common Replace ASIO by simpler implementation, meaning that the telnet RC now only supports a single connection. Move Log, RC to lib/ --- lib/asio/impl/system_executor.hpp | 85 --------------------------------------- 1 file changed, 85 deletions(-) delete mode 100644 lib/asio/impl/system_executor.hpp (limited to 'lib/asio/impl/system_executor.hpp') diff --git a/lib/asio/impl/system_executor.hpp b/lib/asio/impl/system_executor.hpp deleted file mode 100644 index ac4861f..0000000 --- a/lib/asio/impl/system_executor.hpp +++ /dev/null @@ -1,85 +0,0 @@ -// -// impl/system_executor.hpp -// ~~~~~~~~~~~~~~~~~~~~~~~~ -// -// Copyright (c) 2003-2018 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) -// - -#ifndef ASIO_IMPL_SYSTEM_EXECUTOR_HPP -#define ASIO_IMPL_SYSTEM_EXECUTOR_HPP - -#if defined(_MSC_VER) && (_MSC_VER >= 1200) -# pragma once -#endif // defined(_MSC_VER) && (_MSC_VER >= 1200) - -#include "asio/detail/executor_op.hpp" -#include "asio/detail/global.hpp" -#include "asio/detail/recycling_allocator.hpp" -#include "asio/detail/type_traits.hpp" -#include "asio/system_context.hpp" - -#include "asio/detail/push_options.hpp" - -namespace asio { - -inline system_context& system_executor::context() const ASIO_NOEXCEPT -{ - return detail::global(); -} - -template -void system_executor::dispatch( - ASIO_MOVE_ARG(Function) f, const Allocator&) const -{ - typename decay::type tmp(ASIO_MOVE_CAST(Function)(f)); - asio_handler_invoke_helpers::invoke(tmp, tmp); -} - -template -void system_executor::post( - ASIO_MOVE_ARG(Function) f, const Allocator& a) const -{ - typedef typename decay::type function_type; - - system_context& ctx = detail::global(); - - // Allocate and construct an operation to wrap the function. - typedef detail::executor_op op; - typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 }; - p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a); - - ASIO_HANDLER_CREATION((ctx, *p.p, - "system_executor", &this->context(), 0, "post")); - - ctx.scheduler_.post_immediate_completion(p.p, false); - p.v = p.p = 0; -} - -template -void system_executor::defer( - ASIO_MOVE_ARG(Function) f, const Allocator& a) const -{ - typedef typename decay::type function_type; - - system_context& ctx = detail::global(); - - // Allocate and construct an operation to wrap the function. - typedef detail::executor_op op; - typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 }; - p.p = new (p.v) op(ASIO_MOVE_CAST(Function)(f), a); - - ASIO_HANDLER_CREATION((ctx, *p.p, - "system_executor", &this->context(), 0, "defer")); - - ctx.scheduler_.post_immediate_completion(p.p, true); - p.v = p.p = 0; -} - -} // namespace asio - -#include "asio/detail/pop_options.hpp" - -#endif // ASIO_IMPL_SYSTEM_EXECUTOR_HPP -- cgit v1.2.3