summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadCollection.cpp
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2016-05-19 05:13:57 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2016-05-19 05:13:57 +0000
commitbb19a13c0b3fe1ecdc1e46bbf2b06ffc1e25e04e (patch)
treea4383c7cf16b2a6b8e8aa1ff61435ceec0c6a7de /lldb/source/Target/ThreadCollection.cpp
parentfe12d0e3e551a29b880ecfc7673810ce18567765 (diff)
downloadbcm5719-llvm-bb19a13c0b3fe1ecdc1e46bbf2b06ffc1e25e04e.tar.gz
bcm5719-llvm-bb19a13c0b3fe1ecdc1e46bbf2b06ffc1e25e04e.zip
second pass over removal of Mutex and Condition
llvm-svn: 270024
Diffstat (limited to 'lldb/source/Target/ThreadCollection.cpp')
-rw-r--r--lldb/source/Target/ThreadCollection.cpp8
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];
OpenPOWER on IntegriCloud