/* Remote serial support interface definitions for GDB, the GNU Debugger.
- Copyright (C) 1992-2016 Free Software Foundation, Inc.
+ Copyright (C) 1992-2017 Free Software Foundation, Inc.
This file is part of GDB.
typedef void *serial_ttystate;
struct serial;
+struct serial_ops;
+
+/* Create a new serial for OPS. The new serial is not opened. */
/* Try to open NAME. Returns a new `struct serial *' on success, NULL
on failure. The new serial object has a reference count of 1.
extern struct serial *serial_open (const char *name);
+/* Open a new serial stream using OPS. */
+
+extern struct serial *serial_open_ops (const struct serial_ops *ops);
+
/* Returns true if SCB is open. */
extern int serial_is_open (struct serial *scb);
extern void serial_unref (struct serial *scb);
-/* Create a pipe, and put the read end in files[0], and the write end
- in filde[1]. Returns 0 for success, negative value for error (in
+/* Create a pipe, and put the read end in FILDES[0], and the write end
+ in FILDES[1]. Returns 0 for success, negative value for error (in
which case errno contains the error). */
extern int gdb_pipe (int fildes[2]);
buffer. -ve for sticky errors. */
unsigned char *bufp; /* Current byte */
unsigned char buf[BUFSIZ]; /* Da buffer itself */
- int current_timeout; /* (ser-unix.c termio{,s} only), last
- value of VTIME */
- int timeout_remaining; /* (ser-unix.c termio{,s} only), we
- still need to wait for this many
- more seconds. */
- char *name; /* The name of the device or host */
struct serial *next; /* Pointer to the next `struct serial *' */
int debug_p; /* Trace this serial devices operation. */
int async_state; /* Async internal state. */