+2017-04-10 Pedro Alves <palves@redhat.com>
+
+ * thread.c (struct current_thread_cleanup) <next>: Delete field.
+ (current_thread_cleanup_chain): Delete.
+ (restore_current_thread_cleanup_dtor)
+ (make_cleanup_restore_current_thread): Remove references to
+ current_thread_cleanup_chain.
+
2017-04-10 Alan Hayward <alan.hayward@arm.com>
* msp430-tdep.c (msp430_pseudo_register_read): Never return
struct current_thread_cleanup
{
- /* Next in list of currently installed 'struct
- current_thread_cleanup' cleanups. See
- 'current_thread_cleanup_chain' below. */
- struct current_thread_cleanup *next;
-
thread_info *thread;
struct frame_id selected_frame_id;
int selected_frame_level;
int was_removable;
};
-/* A chain of currently installed 'struct current_thread_cleanup'
- cleanups. Restoring the previously selected thread looks up the
- old thread in the thread list by ptid. If the thread changes ptid,
- we need to update the cleanup's thread structure so the look up
- succeeds. */
-static struct current_thread_cleanup *current_thread_cleanup_chain;
-
static void
do_restore_current_thread_cleanup (void *arg)
{
struct thread_info *tp;
struct inferior *inf;
- current_thread_cleanup_chain = current_thread_cleanup_chain->next;
-
if (old->thread != NULL)
old->thread->decref ();
old->inf_id = current_inferior ()->num;
old->was_removable = current_inferior ()->removable;
- old->next = current_thread_cleanup_chain;
- current_thread_cleanup_chain = old;
-
if (!ptid_equal (inferior_ptid, null_ptid))
{
struct frame_info *frame;