(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>
+
+ * 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
}
enable_async_io ();
+ unblock_async_io ();
w = linux_wait_for_event (child);
stop_all_processes ();
disable_async_io ();
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
}
}
+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)
{
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);