From 76df6343d415b134993c3678bf28f78e7bdda26f Mon Sep 17 00:00:00 2001 From: Razvan Becheriu Date: Wed, 11 Sep 2019 15:23:10 +0300 Subject: [PATCH] [#883, !506] fixed comments --- src/lib/dhcpsrv/thread_pool.cc | 3 +-- src/lib/util/threads/tests/lock_guard_unittest.cc | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/lib/dhcpsrv/thread_pool.cc b/src/lib/dhcpsrv/thread_pool.cc index f3d27f28bd..b7da07f2ac 100644 --- a/src/lib/dhcpsrv/thread_pool.cc +++ b/src/lib/dhcpsrv/thread_pool.cc @@ -56,7 +56,7 @@ struct ThreadPoolQueue { /// This function adds an item to the queue and wakes up at least one thread /// waiting on the queue. /// - /// @param item the new iten to be added to the queue + /// @param item the new item to be added to the queue void push(WorkItem item) { std::lock_guard lock(mutex_); queue_.push(item); @@ -153,7 +153,6 @@ private: std::condition_variable cv_; /// @brief the sate of the queue - /// /// The 'enabled' state corresponds to false value /// The 'disabled' state corresponds to true value std::atomic_bool exit_; diff --git a/src/lib/util/threads/tests/lock_guard_unittest.cc b/src/lib/util/threads/tests/lock_guard_unittest.cc index 594d778fbd..10587bda83 100644 --- a/src/lib/util/threads/tests/lock_guard_unittest.cc +++ b/src/lib/util/threads/tests/lock_guard_unittest.cc @@ -47,7 +47,8 @@ public: // lock on a non-recursive mutex resulting in a dead lock dead_lock_ = true; isc_throw(isc::InvalidOperation, - "lock on already locked mutex resulting in deadlock"); + "recursive lock on already locked mutex resulting in " + "dead lock"); } else { // lock on a recursive mutex if (this_thread::get_id() != id_) { @@ -56,7 +57,7 @@ public: dead_lock_ = true; isc_throw(isc::InvalidOperation, "recursive lock on a different thread on already " - "locked mutex resulting in deadlock"); + "locked mutex resulting in dead lock"); } } } @@ -141,7 +142,7 @@ private: /// @brief internal lock state of the mutex int32_t lock_; - /// @brief state which indicated that the mutex in in dead lock + /// @brief state which indicates that the mutex is in dead lock bool dead_lock_; /// @brief total number of locks performed on the mutex -- 2.47.2