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 | |
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')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/gdbserver/linux-low.c | 7 | ||||
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 18 | ||||
-rw-r--r-- | gdb/gdbserver/server.h | 2 |
4 files changed, 33 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index ae1117f..5066aaf 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,12 @@ 2004-02-29 Daniel Jacobowitz <drow@mvista.com> + * 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. + +2004-02-29 Daniel Jacobowitz <drow@mvista.com> + * remote-utils.c (remote_open): Print a status notice after opening a TCP port. * server.c (attach_inferior): Print a status notice after diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 90efd01..ea15516 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -662,6 +662,7 @@ retry: } enable_async_io (); + unblock_async_io (); w = linux_wait_for_event (child); stop_all_processes (); disable_async_io (); @@ -1017,7 +1018,11 @@ linux_resume (struct thread_resume *resume_info) if (pending_flag) for_each_inferior (&all_threads, linux_queue_one_thread); else - for_each_inferior (&all_threads, linux_continue_one_thread); + { + block_async_io (); + enable_async_io (); + for_each_inferior (&all_threads, linux_continue_one_thread); + } } #ifdef HAVE_LINUX_USRREGS 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); diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h index 5212deb..4896afb 100644 --- a/gdb/gdbserver/server.h +++ b/gdb/gdbserver/server.h @@ -134,6 +134,8 @@ void write_ok (char *buf); void write_enn (char *buf); void enable_async_io (void); void disable_async_io (void); +void unblock_async_io (void); +void block_async_io (void); void convert_ascii_to_int (char *from, char *to, int n); void convert_int_to_ascii (char *from, char *to, int n); void new_thread_notify (int id); |