diff options
author | Tristan Gingold <gingold@adacore.com> | 2008-12-16 11:15:58 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2008-12-16 11:15:58 +0000 |
commit | d26b53541880db4303a08e5558a1d3d3cbf9353a (patch) | |
tree | 391438e0193d97f12b2eda4e1bbdf29d33a907bb /gdb/inflow.c | |
parent | 077e0a524271358ddf0dda9993f3c3e4820b2481 (diff) | |
download | gdb-d26b53541880db4303a08e5558a1d3d3cbf9353a.zip gdb-d26b53541880db4303a08e5558a1d3d3cbf9353a.tar.gz gdb-d26b53541880db4303a08e5558a1d3d3cbf9353a.tar.bz2 |
2008-12-16 Tristan Gingold <gingold@adacore.com>
* inflow.c: Remove old_sigio, handle_sigio, old_fcntl_flags,
set_sigio_trap, clear_sigio_trap definitions.
* inferior.h: Remove set_sigio_trap and clear_sigio_trap declarations.
* inf-ptrace.c (inf_ptrace_wait): Remove call to set_sigio_trap
and clear_sigio_trap.
* inf-ttrace.c (inf_ttrace_wait): Ditto.
* linux-nat.c (linux_nat_wait): Ditto.
* spu-linux-nat.c (spu_child_wait): Ditto.
* rs6000-nat.c (rs6000_wait): Ditto.
* target.c: Remove target_activity_function and target_activity_fd.
* target.h: Remove target_activity_function and target_activity_fd
declarations.
Diffstat (limited to 'gdb/inflow.c')
-rw-r--r-- | gdb/inflow.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/gdb/inflow.c b/gdb/inflow.c index e82514e..7c8f2f6 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -651,68 +651,6 @@ clear_sigint_trap (void) } } -#if defined (SIGIO) && defined (FASYNC) && defined (FD_SET) && defined (F_SETOWN) -static void (*old_sigio) (); - -static void -handle_sigio (int signo) -{ - int numfds; - fd_set readfds; - - signal (SIGIO, handle_sigio); - - FD_ZERO (&readfds); - FD_SET (target_activity_fd, &readfds); - numfds = gdb_select (target_activity_fd + 1, &readfds, NULL, NULL, NULL); - if (numfds >= 0 && FD_ISSET (target_activity_fd, &readfds)) - { -#ifndef _WIN32 - if ((*target_activity_function) ()) - kill (PIDGET (inferior_ptid), SIGINT); -#endif - } -} - -static int old_fcntl_flags; - -void -set_sigio_trap (void) -{ - if (target_activity_function) - { - old_sigio = (void (*)()) signal (SIGIO, handle_sigio); - fcntl (target_activity_fd, F_SETOWN, getpid ()); - old_fcntl_flags = fcntl (target_activity_fd, F_GETFL, 0); - fcntl (target_activity_fd, F_SETFL, old_fcntl_flags | FASYNC); - } -} - -void -clear_sigio_trap (void) -{ - if (target_activity_function) - { - signal (SIGIO, old_sigio); - fcntl (target_activity_fd, F_SETFL, old_fcntl_flags); - } -} -#else /* No SIGIO. */ -void -set_sigio_trap (void) -{ - if (target_activity_function) - internal_error (__FILE__, __LINE__, _("failed internal consistency check")); -} - -void -clear_sigio_trap (void) -{ - if (target_activity_function) - internal_error (__FILE__, __LINE__, _("failed internal consistency check")); -} -#endif /* No SIGIO. */ - /* Create a new session if the inferior will run in a different tty. A session is UNIX's way of grouping processes that share a controlling |