summaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2004-02-29 16:47:15 +0000
committerDaniel Jacobowitz <dan@debian.org>2004-02-29 16:47:15 +0000
commitca463e89b48ec52f17abd436a0bee7e1d9df271b (patch)
treea4d8bf4475b686a1c62360663e1f7dd63f1f0c1b /gdb/gdbserver/remote-utils.c
parent3783649b84387b4bbde1b22fb44f4d643c6a6130 (diff)
downloadgdb-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.c18
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);