diff options
author | Kevin Buettner <kevinb@redhat.com> | 2001-05-06 22:22:03 +0000 |
---|---|---|
committer | Kevin Buettner <kevinb@redhat.com> | 2001-05-06 22:22:03 +0000 |
commit | ce696e0556e9ddc48e7d049356a3c3fe6b7399d8 (patch) | |
tree | 64ca31984622469dfdf2ff37a3a142eae50f08e8 /gdb/hpux-thread.c | |
parent | a7c92daeedfd9d5326113d1776c6db7ed18efcc6 (diff) | |
download | gdb-ce696e0556e9ddc48e7d049356a3c3fe6b7399d8.zip gdb-ce696e0556e9ddc48e7d049356a3c3fe6b7399d8.tar.gz gdb-ce696e0556e9ddc48e7d049356a3c3fe6b7399d8.tar.bz2 |
Consolidate save_inferior_ptid/restore_inferior_ptid implementation to
one source file.
Diffstat (limited to 'gdb/hpux-thread.c')
-rw-r--r-- | gdb/hpux-thread.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/gdb/hpux-thread.c b/gdb/hpux-thread.c index 4efeb4a..8401995 100644 --- a/gdb/hpux-thread.c +++ b/gdb/hpux-thread.c @@ -62,10 +62,6 @@ static ptid_t main_ptid; /* Real process ID */ static CORE_ADDR P_cma__g_known_threads; static CORE_ADDR P_cma__g_current_thread; -static struct cleanup *save_inferior_ptid (void); - -static void restore_inferior_ptid (ptid_t pid); - static void hpux_thread_resume (ptid_t ptid, int step, enum target_signal signo); @@ -73,46 +69,6 @@ static void init_hpux_thread_ops (void); static struct target_ops hpux_thread_ops; -/* - - LOCAL FUNCTION - - save_inferior_ptid - Save inferior_ptid on the cleanup list - restore_inferior_ptid - Restore inferior_ptid from the cleanup list - - SYNOPSIS - - struct cleanup *save_inferior_ptid () - void restore_inferior_ptid (int pid) - - DESCRIPTION - - These two functions act in unison to restore inferior_ptid in - case of an error. - - NOTES - - inferior_ptid is a global variable that needs to be changed by many of - these routines before calling functions in procfs.c. In order to - guarantee that inferior_ptid gets restored (in case of errors), you - need to call save_inferior_ptid before changing it. At the end of the - function, you should invoke do_cleanups to restore it. - - */ - - -static struct cleanup * -save_inferior_ptid (void) -{ - return make_cleanup (restore_inferior_ptid, inferior_ptid); -} - -static void -restore_inferior_ptid (ptid_t ptid) -{ - inferior_ptid = ptid; -} - static int find_active_thread (void); static int cached_thread; |