diff options
author | Daniel Jacobowitz <drow@false.org> | 2004-02-29 16:47:15 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2004-02-29 16:47:15 +0000 |
commit | 62ea82f508b97190fce6018ef3545dff79de43cb (patch) | |
tree | b5fda15057810c0c8a1774c878ec0a4553a6572a /gdb/gdbserver/remote-utils.c | |
parent | 6910d122aca0a6e1e9e81b6d74a9ef3215f34137 (diff) | |
download | gdb-62ea82f508b97190fce6018ef3545dff79de43cb.zip gdb-62ea82f508b97190fce6018ef3545dff79de43cb.tar.gz gdb-62ea82f508b97190fce6018ef3545dff79de43cb.tar.bz2 |
* linux-low.c (linux_wait): Unblock async I/O.
(linux_resume): Block and enable async I/O.
* remote-utils.c (block_async_io, unblock_async_io): New functions.
* server.h (block_async_io, unblock_async_io): Add prototypes.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index c9d198f..cd8c3c5 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -368,6 +368,24 @@ input_interrupt (int unused) } void +block_async_io (void) +{ + sigset_t sigio_set; + sigemptyset (&sigio_set); + sigaddset (&sigio_set, SIGIO); + sigprocmask (SIG_BLOCK, &sigio_set, NULL); +} + +void +unblock_async_io (void) +{ + sigset_t sigio_set; + sigemptyset (&sigio_set); + sigaddset (&sigio_set, SIGIO); + sigprocmask (SIG_UNBLOCK, &sigio_set, NULL); +} + +void enable_async_io (void) { signal (SIGIO, input_interrupt); |