summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/ThreadList.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Target/ThreadList.cpp')
-rw-r--r--lldb/source/Target/ThreadList.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/Target/ThreadList.cpp b/lldb/source/Target/ThreadList.cpp
index b6ffd3da442..4fffdac9a34 100644
--- a/lldb/source/Target/ThreadList.cpp
+++ b/lldb/source/Target/ThreadList.cpp
@@ -85,6 +85,17 @@ ThreadList::AddThread (const ThreadSP &thread_sp)
m_threads.push_back(thread_sp);
}
+void
+ThreadList::InsertThread (const lldb::ThreadSP &thread_sp, uint32_t idx)
+{
+ Mutex::Locker locker(GetMutex());
+ if (idx < m_threads.size())
+ m_threads.insert(m_threads.begin() + idx, thread_sp);
+ else
+ m_threads.push_back (thread_sp);
+}
+
+
uint32_t
ThreadList::GetSize (bool can_update)
{
OpenPOWER on IntegriCloud