From 1568b0e16efe3dc1383c249cbffe43620e2aed28 Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Fri, 11 Sep 2020 15:19:45 -0400 Subject: [PATCH] common/WorkQueue: added lock-held versions of ContextWQ queue methods Signed-off-by: Jason Dillaman --- src/common/WorkQueue.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/common/WorkQueue.h b/src/common/WorkQueue.h index 0c16cfc31f200..f25286b288c67 100644 --- a/src/common/WorkQueue.h +++ b/src/common/WorkQueue.h @@ -432,16 +432,25 @@ public: } void requeue_front(T *item) { std::lock_guard pool_locker(m_pool->_lock); + requeue_front(pool_locker, item); + } + void requeue_front(const std::lock_guard&, T *item) { _void_process_finish(nullptr); m_items.push_front(item); } void requeue_back(T *item) { std::lock_guard pool_locker(m_pool->_lock); + requeue_back(pool_locker, item); + } + void requeue_back(const std::lock_guard&, T *item) { _void_process_finish(nullptr); m_items.push_back(item); } void signal() { std::lock_guard pool_locker(m_pool->_lock); + signal(pool_locker); + } + void signal(const std::lock_guard&) { m_pool->_cond.notify_one(); } ceph::mutex &get_pool_lock() { -- 2.39.5