aboutsummaryrefslogtreecommitdiff
path: root/include/lldb/Target/ThreadCollection.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/lldb/Target/ThreadCollection.h')
-rw-r--r--include/lldb/Target/ThreadCollection.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/include/lldb/Target/ThreadCollection.h b/include/lldb/Target/ThreadCollection.h
index 0c2b41cc0ca4..f24167f120a8 100644
--- a/include/lldb/Target/ThreadCollection.h
+++ b/include/lldb/Target/ThreadCollection.h
@@ -10,10 +10,10 @@
#ifndef liblldb_ThreadCollection_h_
#define liblldb_ThreadCollection_h_
+#include <mutex>
#include <vector>
#include "lldb/lldb-private.h"
-#include "lldb/Host/Mutex.h"
#include "lldb/Utility/Iterable.h"
namespace lldb_private {
@@ -22,8 +22,8 @@ class ThreadCollection
{
public:
typedef std::vector<lldb::ThreadSP> collection;
- typedef LockingAdaptedIterable<collection, lldb::ThreadSP, vector_adapter> ThreadIterable;
-
+ typedef LockingAdaptedIterable<collection, lldb::ThreadSP, vector_adapter, std::recursive_mutex> ThreadIterable;
+
ThreadCollection();
ThreadCollection(collection threads);
@@ -38,7 +38,10 @@ public:
void
AddThread (const lldb::ThreadSP &thread_sp);
-
+
+ void
+ AddThreadSortedByIndexID (const lldb::ThreadSP &thread_sp);
+
void
InsertThread (const lldb::ThreadSP &thread_sp, uint32_t idx);
@@ -53,16 +56,16 @@ public:
{
return ThreadIterable(m_threads, GetMutex());
}
-
- virtual Mutex &
+
+ virtual std::recursive_mutex &
GetMutex()
{
return m_mutex;
}
-
+
protected:
collection m_threads;
- Mutex m_mutex;
+ std::recursive_mutex m_mutex;
};
} // namespace lldb_private