From: Jason Dillaman Date: Fri, 11 Sep 2020 19:19:45 +0000 (-0400) Subject: common/WorkQueue: added lock-held versions of ContextWQ queue methods X-Git-Tag: v15.2.9~122^2~91^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1568b0e16efe3dc1383c249cbffe43620e2aed28;p=ceph.git common/WorkQueue: added lock-held versions of ContextWQ queue methods Signed-off-by: Jason Dillaman --- diff --git a/src/common/WorkQueue.h b/src/common/WorkQueue.h index 0c16cfc31f20..f25286b288c6 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() {