diff options
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index c4a8fb5..158b653 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -66,6 +66,10 @@ #include <winsock.h> #endif +#if __QNX__ +#include <sys/iomgr.h> +#endif /* __QNX__ */ + #ifndef HAVE_SOCKLEN_T typedef int socklen_t; #endif @@ -814,6 +818,28 @@ unblock_async_io (void) #endif } +#ifdef __QNX__ +static void +nto_comctrl (int enable) +{ + struct sigevent event; + + if (enable) + { + event.sigev_notify = SIGEV_SIGNAL_THREAD; + event.sigev_signo = SIGIO; + event.sigev_code = 0; + event.sigev_value.sival_ptr = NULL; + event.sigev_priority = -1; + ionotify (remote_desc, _NOTIFY_ACTION_POLLARM, _NOTIFY_COND_INPUT, + &event); + } + else + ionotify (remote_desc, _NOTIFY_ACTION_POLL, _NOTIFY_COND_INPUT, NULL); +} +#endif /* __QNX__ */ + + /* Current state of asynchronous I/O. */ static int async_io_enabled; @@ -828,6 +854,9 @@ enable_async_io (void) signal (SIGIO, input_interrupt); #endif async_io_enabled = 1; +#ifdef __QNX__ + nto_comctrl (1); +#endif /* __QNX__ */ } /* Disable asynchronous I/O. */ @@ -841,6 +870,10 @@ disable_async_io (void) signal (SIGIO, SIG_IGN); #endif async_io_enabled = 0; +#ifdef __QNX__ + nto_comctrl (0); +#endif /* __QNX__ */ + } void |