X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fserial.h;h=9e669cbb2bb1fb0bf6f3f45df3e9fd060e278cee;hb=2fe3b329f69ca294a8ad3f1f655df7db33a6eb65;hp=7e7e530668649cd52464622640b955a03d29cac5;hpb=a14a8fad360ddc983045a94621380761fa30721d;p=binutils-gdb.git diff --git a/gdb/serial.h b/gdb/serial.h index 7e7e5306686..9e669cbb2bb 100644 --- a/gdb/serial.h +++ b/gdb/serial.h @@ -33,6 +33,9 @@ struct _serial_t unsigned char *bufp; /* Current byte */ unsigned char buf[BUFSIZ]; /* Da buffer itself */ int current_timeout; /* (termio{s} only), last value of VTIME */ + /* ser-unix.c termio{,s} only, we still need to wait for this many more + seconds. */ + int timeout_remaining; }; typedef struct _serial_t *serial_t; @@ -62,7 +65,7 @@ void serial_add_interface PARAMS ((struct serial_ops *optable)); serial_t serial_open PARAMS ((const char *name)); -serial_t serial_fdopen PARAMS ((int fd)); +serial_t serial_fdopen PARAMS ((const int fd)); /* For most routines, if a failure is indicated, then errno should be examined. */ @@ -102,7 +105,9 @@ serial_t serial_fdopen PARAMS ((int fd)); #define SERIAL_GET_TTY_STATE(SERIAL_T) (SERIAL_T)->ops->get_tty_state((SERIAL_T)) /* Set the state of the tty to TTYSTATE. The change is immediate. - When changing to or from raw mode, input might be discarded. */ + When changing to or from raw mode, input might be discarded. + Returns 0 for success, negative value for error (in which case errno + contains the error). */ #define SERIAL_SET_TTY_STATE(SERIAL_T, TTYSTATE) (SERIAL_T)->ops->set_tty_state((SERIAL_T), (TTYSTATE)) /* printf_filtered a user-comprehensible description of ttystate. */