From 94ad707b1b2daa3c3afc145c31d51b9a841ae246 Mon Sep 17 00:00:00 2001 From: Hari Hara Naveen S Date: Wed, 1 Nov 2023 15:32:39 -0500 Subject: [PATCH] changed name to RangeLock --- .../include/hpx/synchronization/range_lock.hpp | 8 ++++---- libs/core/synchronization/tests/unit/range_lock.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libs/core/synchronization/include/hpx/synchronization/range_lock.hpp b/libs/core/synchronization/include/hpx/synchronization/range_lock.hpp index 343d18cd383b..c09b536fd582 100644 --- a/libs/core/synchronization/include/hpx/synchronization/range_lock.hpp +++ b/libs/core/synchronization/include/hpx/synchronization/range_lock.hpp @@ -11,7 +11,7 @@ namespace hpx::synchronization { template typename Guard> - class ByteLock + class RangeLock { template using MapTy = boost::container::flat_map; @@ -28,7 +28,7 @@ namespace hpx::synchronization { }; template class Guard> - std::size_t ByteLock::lock(std::size_t begin, std::size_t end) + std::size_t RangeLock::lock(std::size_t begin, std::size_t end) { std::size_t lockId = 0; bool localFlag = false; @@ -71,7 +71,7 @@ namespace hpx::synchronization { } template class Guard> - void ByteLock::unlock(std::size_t lockId) + void RangeLock::unlock(std::size_t lockId) { const Guard lock_guard(mtx); @@ -84,7 +84,7 @@ namespace hpx::synchronization { } template class Guard> - std::size_t ByteLock::try_lock( + std::size_t RangeLock::try_lock( std::size_t begin, std::size_t end) { const Guard lock_guard(mtx); diff --git a/libs/core/synchronization/tests/unit/range_lock.cpp b/libs/core/synchronization/tests/unit/range_lock.cpp index 8c94129e8e8c..a83162023f5f 100644 --- a/libs/core/synchronization/tests/unit/range_lock.cpp +++ b/libs/core/synchronization/tests/unit/range_lock.cpp @@ -4,7 +4,7 @@ int main() { - hpx::synchronization::ByteLock bl; - std::size_t x = bl.lock(0, 10); - bl.unlock(x); + hpx::synchronization::RangeLock rl; + std::size_t x = rl.lock(0, 10); + rl.unlock(x); }