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/Target/ThreadCollection.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/source/Target/ThreadCollection.cpp') diff --git a/lldb/source/Target/ThreadCollection.cpp b/lldb/source/Target/ThreadCollection.cpp index dc1e38e02420..2f2e410ba374 100644 --- a/lldb/source/Target/ThreadCollection.cpp +++ b/lldb/source/Target/ThreadCollection.cpp @@ -30,14 +30,14 @@ ThreadCollection::ThreadCollection(collection threads) : void ThreadCollection::AddThread (const ThreadSP &thread_sp) { - Mutex::Locker locker(GetMutex()); + std::lock_guard guard(GetMutex()); m_threads.push_back (thread_sp); } void ThreadCollection::InsertThread (const lldb::ThreadSP &thread_sp, uint32_t idx) { - Mutex::Locker locker(GetMutex()); + std::lock_guard guard(GetMutex()); if (idx < m_threads.size()) m_threads.insert(m_threads.begin() + idx, thread_sp); else @@ -47,14 +47,14 @@ ThreadCollection::InsertThread (const lldb::ThreadSP &thread_sp, uint32_t idx) uint32_t ThreadCollection::GetSize () { - Mutex::Locker locker(GetMutex()); + std::lock_guard guard(GetMutex()); return m_threads.size(); } ThreadSP ThreadCollection::GetThreadAtIndex (uint32_t idx) { - Mutex::Locker locker(GetMutex()); + std::lock_guard guard(GetMutex()); ThreadSP thread_sp; if (idx < m_threads.size()) thread_sp = m_threads[idx]; -- cgit v1.2.3