diff options
author | Daniel Jacobowitz <dan@debian.org> | 2004-02-29 16:47:15 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2004-02-29 16:47:15 +0000 |
commit | ca463e89b48ec52f17abd436a0bee7e1d9df271b (patch) | |
tree | a4d8bf4475b686a1c62360663e1f7dd63f1f0c1b /gdb/gdbserver/remote-utils.c | |
parent | 3783649b84387b4bbde1b22fb44f4d643c6a6130 (diff) | |
download | gdb-ca463e89b48ec52f17abd436a0bee7e1d9df271b.tar.gz |
* 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 c9d198fb289..cd8c3c56cbd 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); |