forked from Imagelibrary/binutils-gdb
* linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
* remote-utils.c (remote_open): Do not call disable_async_io. (block_async_io): Delete. (unblock_async_io): Make static. (initialize_async_io): New. * server.c (handle_v_cont): Handle async I/O here. (myresume): Likewise. Move other common resume tasks here... (main): ... from here. Call initialize_async_io. Disable async I/O before the main loop. * server.h (initialize_async_io): Declare. (block_async_io, unblock_async_io): Delete prototypes. * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
This commit is contained in:
@@ -275,7 +275,6 @@ remote_open (char *name)
|
||||
fcntl (remote_desc, F_SETOWN, getpid ());
|
||||
#endif
|
||||
#endif
|
||||
disable_async_io ();
|
||||
}
|
||||
|
||||
void
|
||||
@@ -645,22 +644,12 @@ check_remote_input_interrupt_request (void)
|
||||
accept Control-C from the client, and must be disabled when talking to
|
||||
the client. */
|
||||
|
||||
void
|
||||
block_async_io (void)
|
||||
{
|
||||
#ifndef USE_WIN32API
|
||||
sigset_t sigio_set;
|
||||
sigemptyset (&sigio_set);
|
||||
sigaddset (&sigio_set, SIGIO);
|
||||
sigprocmask (SIG_BLOCK, &sigio_set, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
unblock_async_io (void)
|
||||
{
|
||||
#ifndef USE_WIN32API
|
||||
sigset_t sigio_set;
|
||||
|
||||
sigemptyset (&sigio_set);
|
||||
sigaddset (&sigio_set, SIGIO);
|
||||
sigprocmask (SIG_UNBLOCK, &sigio_set, NULL);
|
||||
@@ -696,6 +685,17 @@ disable_async_io (void)
|
||||
async_io_enabled = 0;
|
||||
}
|
||||
|
||||
void
|
||||
initialize_async_io (void)
|
||||
{
|
||||
/* Make sure that async I/O starts disabled. */
|
||||
async_io_enabled = 1;
|
||||
disable_async_io ();
|
||||
|
||||
/* Make sure the signal is unblocked. */
|
||||
unblock_async_io ();
|
||||
}
|
||||
|
||||
/* Returns next char from remote GDB. -1 if error. */
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user