#ifdef PT_LWP_EVENTS
/* With support for thread events, threads are added/deleted from the
list as events are reported, so just try deleting exited threads. */
- delete_exited_threads ();
+ delete_exited_threads (this);
#else
prune_threads (this);
extern void prune_threads (process_stratum_target *target);
/* Delete threads marked THREAD_EXITED. Unlike prune_threads, this
- does not consult the target about whether the thread is alive right
- now. */
-extern void delete_exited_threads (void);
+ does not consult TARGET about whether the thread is alive right
+ now. If TARGET is nullptr, operate on all targets. */
+extern void delete_exited_threads (process_stratum_target *target);
/* Return true if PC is in the stepping range of THREAD. */
{
/* If this is the first inferior with threads, reset the global
thread id. */
- delete_exited_threads ();
+ delete_exited_threads (nullptr);
if (!any_thread_p ())
init_thread_list ();
/* We add/delete threads from the list as clone/exit events are
processed, so just try deleting exited threads still in the
thread list. */
- delete_exited_threads ();
+ delete_exited_threads (this);
/* Update the processor core that each lwp/thread was last seen
running on. */
void
nbsd_nat_target::update_thread_list ()
{
- delete_exited_threads ();
+ delete_exited_threads (this);
}
/* Convert PTID to a string. */
/* See gdbthreads.h. */
void
-delete_exited_threads (void)
+delete_exited_threads (process_stratum_target *target)
{
- for (thread_info &tp : all_threads_safe ())
+ for (thread_info &tp : all_threads_safe (target))
if (tp.state () == THREAD_EXITED)
delete_thread (&tp);
}
/* Since the current thread may have changed, see if there is any
exited thread we can now delete. */
- delete_exited_threads ();
+ delete_exited_threads (nullptr);
}
/* Print thread and frame switch command response. */