summaryrefslogtreecommitdiff
path: root/gdb/serial.h
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-04-24 21:00:13 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-04-24 21:00:13 +0000
commit8532837d79ca732e52c3d69574231c9ebb74b00f (patch)
tree073453a605f4a150b40d448f3ce7cca92fdad0b1 /gdb/serial.h
parent5ff85ea5e577c46dde82c577fb03cc2b839316ea (diff)
downloadgdb-8532837d79ca732e52c3d69574231c9ebb74b00f.tar.gz
* ser-mingw.c: Include <conio.h>.
(struct ser_console_state, struct net_windows_state): Add exit_select, have_stopped, thread. (pipe_select_thread, console_select_thread) (net_windows_select_thread): Don't create a local state copy or close stop_select. Exit on exit_select instead of stop_select. Set have_stopped. (console_select_thread): Don't report control keypresses as pending input. (pipe_select_thread): Allow stop_select to interrupt sleeping. (set_console_wait_handle): Create exit_select and have_stopped. Save the thread handle. Check _kbhit before starting a thread. (ser_console_done_wait_handle): New. (ser_console_close): Close new handles. Wait for the thread to exit. (new_windows_select_thread): Assert that an event occurred. (net_windows_wait_handle): Check for pending input before starting a thread. (net_windows_done_wait_handle): New. (net_windows_open): Create exit_select and have_stopped. Save the thread handle. (net_windows_close): Close new handles. Wait for the thread to exit. (_intiialize_ser_windows): Register done_wait_handle methods. * serial.c [USE_WIN32API] (serial_done_wait_handle): New. * serial.h [USE_WIN32API] (struct serial_ops): Add done_wait_handle. [USE_WIN32API] (serial_done_wait_handle): New prototype. * mingw-hdep.c (gdb_select): Use serial_done_wait_handle.
Diffstat (limited to 'gdb/serial.h')
-rw-r--r--gdb/serial.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/serial.h b/gdb/serial.h
index d9a395b3fc4..8d7ae6595bc 100644
--- a/gdb/serial.h
+++ b/gdb/serial.h
@@ -253,6 +253,7 @@ struct serial_ops
when signaled, in *READ. Return a handle indicating errors
in *EXCEPT. */
void (*wait_handle) (struct serial *scb, HANDLE *read, HANDLE *except);
+ void (*done_wait_handle) (struct serial *scb);
#endif /* USE_WIN32API */
};
@@ -270,6 +271,9 @@ extern void serial_log_command (const char *);
serial device. */
extern void serial_wait_handle (struct serial *, HANDLE *, HANDLE *);
+/* Windows-only: signal that we are done with the wait handles. */
+extern void serial_done_wait_handle (struct serial *);
+
#endif /* USE_WIN32API */
#endif /* SERIAL_H */