-void
-add_inferior_to_list (struct inferior_list *list,
- struct inferior_list_entry *new_inferior)
-{
- new_inferior->next = NULL;
- if (list->tail != NULL)
- list->tail->next = new_inferior;
- else
- list->head = new_inferior;
- list->tail = new_inferior;
-}
-
-void
-for_each_inferior (struct inferior_list *list,
- void (*action) (struct inferior_list_entry *))
-{
- struct inferior_list_entry *cur = list->head, *next;
-
- while (cur != NULL)
- {
- next = cur->next;
- (*action) (cur);
- cur = next;
- }
-}
-
-/* When debugging a single-threaded program, the threads list (such as
- it is) is indexed by PID. When debugging a multi-threaded program,
- we index by TID. This ugly routine replaces the
- first-debugged-thread's PID with its TID. */
-
-void
-change_inferior_id (struct inferior_list *list,
- unsigned long new_id)