Basic DDMS thread support.
DDMS can now see our running threads...
Change-Id: I42d2fce4db9eb846fa0b4aac46ca6bb3443a6c9f
diff --git a/src/thread_list.cc b/src/thread_list.cc
index 0be0f09..26faede 100644
--- a/src/thread_list.cc
+++ b/src/thread_list.cc
@@ -382,6 +382,13 @@
thread_exit_cond_.Signal();
}
+void ThreadList::ForEach(void (*callback)(Thread*)) {
+ thread_list_lock_.AssertHeld();
+ for (It it = list_.begin(), end = list_.end(); it != end; ++it) {
+ callback(*it);
+ }
+}
+
void ThreadList::VisitRoots(Heap::RootVisitor* visitor, void* arg) const {
ThreadListLocker locker(this);
for (It it = list_.begin(), end = list_.end(); it != end; ++it) {