second pass over removal of Mutex and Condition

llvm-svn: 270024
This commit is contained in:
Saleem Abdulrasool
2016-05-19 05:13:57 +00:00
parent fe12d0e3e5
commit bb19a13c0b
84 changed files with 995 additions and 1046 deletions

View File

@@ -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];