Change inferior thread list to be a thread map
[deliverable/binutils-gdb.git] / gdb / inferior.h
index 4229c6017d92eb9742ef83e1b83688ed6a9e6b30..4883282f63cab067214d2c576c59da8034648072 100644 (file)
@@ -55,6 +55,7 @@ struct thread_info;
 
 #include "gdbsupport/common-inferior.h"
 #include "gdbthread.h"
+#include "thread-map.h"
 
 #include "process-stratum-target.h"
 
@@ -381,7 +382,7 @@ public:
   struct inferior *next = NULL;
 
   /* This inferior's thread list.  */
-  thread_info *thread_list = nullptr;
+  ptid_thread_map thread_map;
 
   /* Returns a range adapter covering the inferior's threads,
      including exited threads.  Used like this:
@@ -389,8 +390,8 @@ public:
        for (thread_info *thr : inf->threads ())
         { .... }
   */
-  inf_threads_range threads ()
-  { return inf_threads_range (this->thread_list); }
+  all_thread_map_range threads ()
+  { return all_thread_map_range (this->thread_map); }
 
   /* Returns a range adapter covering the inferior's non-exited
      threads.  Used like this:
@@ -398,19 +399,8 @@ public:
        for (thread_info *thr : inf->non_exited_threads ())
         { .... }
   */
-  inf_non_exited_threads_range non_exited_threads ()
-  { return inf_non_exited_threads_range (this->thread_list); }
-
-  /* Like inferior::threads(), but returns a range adapter that can be
-     used with range-for, safely.  I.e., it is safe to delete the
-     currently-iterated thread, like this:
-
-     for (thread_info *t : inf->threads_safe ())
-       if (some_condition ())
-        delete f;
-  */
-  inline safe_inf_threads_range threads_safe ()
-  { return safe_inf_threads_range (this->thread_list); }
+  non_exited_thread_map_range non_exited_threads ()
+  { return non_exited_thread_map_range (this->thread_map); }
 
   /* Convenient handle (GDB inferior id).  Unique across all
      inferiors.  */
This page took 0.023963 seconds and 4 git commands to generate.