From bb19a13c0b3fe1ecdc1e46bbf2b06ffc1e25e04e Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 19 May 2016 05:13:57 +0000 Subject: second pass over removal of Mutex and Condition llvm-svn: 270024 --- lldb/source/Commands/CommandObjectWatchpoint.cpp | 31 ++++++++++++------------ 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'lldb/source/Commands/CommandObjectWatchpoint.cpp') diff --git a/lldb/source/Commands/CommandObjectWatchpoint.cpp b/lldb/source/Commands/CommandObjectWatchpoint.cpp index d3071d5cfd7b..ddda3ad9fe1b 100644 --- a/lldb/source/Commands/CommandObjectWatchpoint.cpp +++ b/lldb/source/Commands/CommandObjectWatchpoint.cpp @@ -265,8 +265,9 @@ protected: } const WatchpointList &watchpoints = target->GetWatchpointList(); - Mutex::Locker locker; - target->GetWatchpointList().GetListMutex(locker); + + std::unique_lock lock; + target->GetWatchpointList().GetListMutex(lock); size_t num_watchpoints = watchpoints.GetSize(); @@ -369,8 +370,8 @@ protected: if (!CheckTargetForWatchpointOperations(target, result)) return false; - Mutex::Locker locker; - target->GetWatchpointList().GetListMutex(locker); + std::unique_lock lock; + target->GetWatchpointList().GetListMutex(lock); const WatchpointList &watchpoints = target->GetWatchpointList(); @@ -444,8 +445,8 @@ protected: if (!CheckTargetForWatchpointOperations(target, result)) return false; - Mutex::Locker locker; - target->GetWatchpointList().GetListMutex(locker); + std::unique_lock lock; + target->GetWatchpointList().GetListMutex(lock); const WatchpointList &watchpoints = target->GetWatchpointList(); size_t num_watchpoints = watchpoints.GetSize(); @@ -525,9 +526,9 @@ protected: if (!CheckTargetForWatchpointOperations(target, result)) return false; - Mutex::Locker locker; - target->GetWatchpointList().GetListMutex(locker); - + std::unique_lock lock; + target->GetWatchpointList().GetListMutex(lock); + const WatchpointList &watchpoints = target->GetWatchpointList(); size_t num_watchpoints = watchpoints.GetSize(); @@ -666,9 +667,9 @@ protected: if (!CheckTargetForWatchpointOperations(target, result)) return false; - Mutex::Locker locker; - target->GetWatchpointList().GetListMutex(locker); - + std::unique_lock lock; + target->GetWatchpointList().GetListMutex(lock); + const WatchpointList &watchpoints = target->GetWatchpointList(); size_t num_watchpoints = watchpoints.GetSize(); @@ -819,9 +820,9 @@ protected: if (!CheckTargetForWatchpointOperations(target, result)) return false; - Mutex::Locker locker; - target->GetWatchpointList().GetListMutex(locker); - + std::unique_lock lock; + target->GetWatchpointList().GetListMutex(lock); + const WatchpointList &watchpoints = target->GetWatchpointList(); size_t num_watchpoints = watchpoints.GetSize(); -- cgit v1.2.3