]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/asio/detail/impl/kqueue_reactor.hpp
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / boost / asio / detail / impl / kqueue_reactor.hpp
index bc29b84b5abfd0b883a753b0febe3b3d3b618de5..8d302b6e6844ed12db451573623ac56f7d650925 100644 (file)
@@ -2,7 +2,7 @@
 // detail/impl/kqueue_reactor.hpp
 // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 //
-// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2022 Christopher M. Kohlhoff (chris at kohlhoff dot com)
 // Copyright (c) 2005 Stefan Arentz (stefan at soze dot com)
 //
 // Distributed under the Boost Software License, Version 1.0. (See accompanying
 
 #if defined(BOOST_ASIO_HAS_KQUEUE)
 
+#include <boost/asio/detail/scheduler.hpp>
+
 #include <boost/asio/detail/push_options.hpp>
 
 namespace boost {
 namespace asio {
 namespace detail {
 
+inline void kqueue_reactor::post_immediate_completion(
+    operation* op, bool is_continuation)
+{
+  scheduler_.post_immediate_completion(op, is_continuation);
+}
+
 template <typename Time_Traits>
 void kqueue_reactor::add_timer_queue(timer_queue<Time_Traits>& queue)
 {
@@ -71,6 +79,18 @@ std::size_t kqueue_reactor::cancel_timer(timer_queue<Time_Traits>& queue,
   return n;
 }
 
+template <typename Time_Traits>
+void kqueue_reactor::cancel_timer_by_key(timer_queue<Time_Traits>& queue,
+    typename timer_queue<Time_Traits>::per_timer_data* timer,
+    void* cancellation_key)
+{
+  mutex::scoped_lock lock(mutex_);
+  op_queue<operation> ops;
+  queue.cancel_timer_by_key(timer, ops, cancellation_key);
+  lock.unlock();
+  scheduler_.post_deferred_completions(ops);
+}
+
 template <typename Time_Traits>
 void kqueue_reactor::move_timer(timer_queue<Time_Traits>& queue,
     typename timer_queue<Time_Traits>::per_timer_data& target,