From a0df28255d61bfb4f6ff888e13d35fc82db55cc8 Mon Sep 17 00:00:00 2001 From: gong-guilin Date: Wed, 10 Sep 2025 13:42:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gong-guilin --- services/safwk/include/local_ability_manager.h | 1 - services/safwk/src/local_ability_manager.cpp | 3 --- 2 files changed, 4 deletions(-) diff --git a/services/safwk/include/local_ability_manager.h b/services/safwk/include/local_ability_manager.h index 2f32917..0a4c4bf 100644 --- a/services/safwk/include/local_ability_manager.h +++ b/services/safwk/include/local_ability_manager.h @@ -151,7 +151,6 @@ private: std::unique_ptr initPool_; std::unique_ptr idleTimer_; // longtime-unusedtimeout map - std::shared_mutex unusedCfgMapLock_; std::map unusedCfgMap_; uint32_t ondemandTimer_ = 0; timer_t residentTimer_ = nullptr; diff --git a/services/safwk/src/local_ability_manager.cpp b/services/safwk/src/local_ability_manager.cpp index 8c68530..b387dda 100644 --- a/services/safwk/src/local_ability_manager.cpp +++ b/services/safwk/src/local_ability_manager.cpp @@ -1082,7 +1082,6 @@ bool LocalAbilityManager::NoNeedCheckUnused(int32_t saId) bool LocalAbilityManager::IsConfigUnused() { - std::shared_lock readLock(unusedCfgMapLock_); HILOGI(TAG, "unusedCfgMap_ size:%{public}zu", unusedCfgMap_.size()); return !unusedCfgMap_.empty(); } @@ -1102,7 +1101,6 @@ void LocalAbilityManager::LimitUnusedTimeout(int32_t saId, int32_t timeout) void LocalAbilityManager::InitUnusedCfg() { auto saProfileList = profileParser_->GetAllSaProfiles(); - std::shared_lock writeLock(unusedCfgMapLock_); for (const auto& saProfile : saProfileList) { if (!saProfile.runOnCreate && saProfile.stopOnDemand.unusedTimeout != -1) { LimitUnusedTimeout(saProfile.saId, saProfile.stopOnDemand.unusedTimeout); @@ -1168,7 +1166,6 @@ void LocalAbilityManager::IdentifyUnusedOndemand() return; } - std::shared_lock readLock(unusedCfgMapLock_); for (const auto& it : unusedCfgMap_) { int32_t saId = it.first; uint64_t lastRequestTime; -- Gitee