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 | 5804effc2da38cf13cabc7a84a2c314dd4bd6d1e (patch) | |
tree | 2cc0af23c1ce60fe47549b576a92385dc9437394 /gdb/lin-lwp.c | |
parent | 97692badc52dec581548db39d8a94936032dbc2c (diff) | |
download | gdb-5804effc2da38cf13cabc7a84a2c314dd4bd6d1e.tar.gz |
Consolidate save_inferior_ptid/restore_inferior_ptid implementation to
one source file.
Diffstat (limited to 'gdb/lin-lwp.c')
-rw-r--r-- | gdb/lin-lwp.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/gdb/lin-lwp.c b/gdb/lin-lwp.c index 58ad3c5857e..9525ac651ae 100644 --- a/gdb/lin-lwp.c +++ b/gdb/lin-lwp.c @@ -267,27 +267,6 @@ iterate_over_lwps (int (*callback) (struct lwp_info *, void *), void *data) } -/* Helper functions. */ - -static void -restore_inferior_ptid (void *arg) -{ - ptid_t *saved_ptid_ptr = arg; - inferior_ptid = *saved_ptid_ptr; - xfree (arg); -} - -static struct cleanup * -save_inferior_ptid (void) -{ - ptid_t *saved_ptid_ptr; - - saved_ptid_ptr = xmalloc (sizeof (ptid_t)); - *saved_ptid_ptr = inferior_ptid; - return make_cleanup (restore_inferior_ptid, saved_ptid_ptr); -} - - /* Implementation of the PREPARE_TO_PROCEED hook for the Linux LWP layer. @@ -722,7 +701,7 @@ lin_lwp_wait (ptid_t ptid, struct target_waitstatus *ourstatus) if (debug_lin_lwp) fprintf_unfiltered (gdb_stdlog, "Waiting for specific LWP %d.\n", - (int) GET_LWP (ptid)); + GET_LWP (ptid)); /* We have a specific LWP to check. */ lp = find_lwp_pid (ptid); |