diff options
Diffstat (limited to 'lldb/source/Target/ThreadCollection.cpp')
-rw-r--r-- | lldb/source/Target/ThreadCollection.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Target/ThreadCollection.cpp b/lldb/source/Target/ThreadCollection.cpp index dc1e38e0242..2f2e410ba37 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<std::recursive_mutex> 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<std::recursive_mutex> 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<std::recursive_mutex> guard(GetMutex()); return m_threads.size(); } ThreadSP ThreadCollection::GetThreadAtIndex (uint32_t idx) { - Mutex::Locker locker(GetMutex()); + std::lock_guard<std::recursive_mutex> guard(GetMutex()); ThreadSP thread_sp; if (idx < m_threads.size()) thread_sp = m_threads[idx]; |