+2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * lynx.low (lynx_delete_thread_callback): Remove.
+ (lynx_mourn): Use for_each_thread.
+
2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
* regcache.c (regcache_invalidate_one): Remove.
return 0;
}
-/* A callback for find_inferior which removes from the thread list
- all threads belonging to process PROC. */
-
-static int
-lynx_delete_thread_callback (thread_info *thread, void *proc)
-{
- struct process_info *process = (struct process_info *) proc;
-
- if (thread->id.pid () == pid_of (process))
- remove_thread (thread);
-
- return 0;
-}
-
/* Implement the mourn target_ops method. */
static void
lynx_mourn (struct process_info *proc)
{
- find_inferior (&all_threads, lynx_delete_thread_callback, proc);
+ for_each_thread (proc->pid, remove_thread);
/* Free our private data. */
free (proc->priv);