diff options
author | Aleksandar Ristovski <aristovski@qnx.com> | 2009-07-06 18:31:20 +0000 |
---|---|---|
committer | Aleksandar Ristovski <aristovski@qnx.com> | 2009-07-06 18:31:20 +0000 |
commit | ac8c974e4fc01aa939e29bf9e20dc4e074eefbc8 (patch) | |
tree | 0c674c14944154c6dac7d14faae191c24be2effb /gdb/gdbserver/remote-utils.c | |
parent | e23578923827cd7506e82b255fb0ed3839b880f2 (diff) | |
download | gdb-ac8c974e4fc01aa939e29bf9e20dc4e074eefbc8.zip gdb-ac8c974e4fc01aa939e29bf9e20dc4e074eefbc8.tar.gz gdb-ac8c974e4fc01aa939e29bf9e20dc4e074eefbc8.tar.bz2 |
Adding Neutrino gdbserver.
* configure: Regenerated.
* configure.ac: Add case for srv_qnx and set LIBS accordingly.
* configure.srv (i[34567]86-*-nto*): New target.
* nto-low.c, nto-low.h, nto-x86-low.c: New files.
* remote-utils.c [__QNX__]: Include sys/iomgr.h
(nto_comctrl) [__QNX__]: New function.
(enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
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 |