+ if (t != self)
+ (void) threads_resume_thread(t, SUSPEND_REASON_DUMP);
+ }
+
+ // Unlock the thread lists.
+ unlock();
+}
+
+
+/**
+ * Fills the passed list with all currently active threads. Creating a copy
+ * of the thread list here, is the only way to ensure we do not end up in a
+ * dead-lock when iterating over the list.
+ *
+ * @param list list class to be filled
+ */
+void ThreadList::get_active_threads(List<threadobject*> &list)
+{
+ // Lock the thread lists.
+ lock();
+
+ // Use the assignment operator to create a copy of the thread list.
+ list = _active_thread_list;
+
+ // Unlock the thread lists.
+ unlock();
+}
+
+
+/**
+ * Fills the passed list with all currently active threads which should be
+ * visible to Java. Creating a copy of the thread list here, is the only way
+ * to ensure we do not end up in a dead-lock when iterating over the list.
+ *
+ * @param list list class to be filled
+ */
+void ThreadList::get_active_java_threads(List<threadobject*> &list)
+{
+ // Lock the thread lists.
+ lock();
+
+ // Iterate over all active threads.
+ for (List<threadobject*>::iterator it = _active_thread_list.begin(); it != _active_thread_list.end(); it++) {
+ threadobject* t = *it;
+
+ // We skip internal threads.
+ if (t->flags & THREAD_FLAG_INTERNAL)
+ continue;
+
+ list.push_back(t);