Replacing a bogus file with a semi-bogus one (sharing through devo).
[deliverable/binutils-gdb.git] / gdb / serial.h
index f1963d0961858c74bffd61c00aa9332499aa910e..04332bcb11fc9c5cad42e5d86945b64bf76f75c8 100644 (file)
@@ -50,7 +50,9 @@ struct serial_ops {
   void (*close) PARAMS ((serial_t));
   int (*readchar) PARAMS ((serial_t, int timeout));
   int (*write) PARAMS ((serial_t, const char *str, int len));
+  /* Discard pending output */
   int (*flush_output) PARAMS ((serial_t));
+  /* Discard pending input */
   int (*flush_input) PARAMS ((serial_t));
   int (*send_break) PARAMS ((serial_t));
   void (*go_raw) PARAMS ((serial_t));
@@ -61,6 +63,8 @@ struct serial_ops {
     PARAMS ((serial_t, serial_ttystate, serial_ttystate));
   int (*setbaudrate) PARAMS ((serial_t, int rate));
   int (*setstopbits) PARAMS ((serial_t, int num));
+  /* Wait for output to drain */
+  int (*drain_output) PARAMS ((serial_t));
 };
 
 /* Add a new serial interface to the interface list */
@@ -83,7 +87,12 @@ serial_t serial_fdopen PARAMS ((const int fd));
 
 #define SERIAL_FDOPEN(FD) serial_fdopen(FD)
 
-/* Flush pending output.  Might also flush input (if this system can't flush
+/* Allow pending output to drain. */
+
+#define SERIAL_DRAIN_OUTPUT(SERIAL_T) \
+  ((SERIAL_T)->ops->drain_output((SERIAL_T)))
+  
+/* Flush (discard) pending output.  Might also flush input (if this system can't flush
    only output).  */
 
 #define SERIAL_FLUSH_OUTPUT(SERIAL_T) \
This page took 0.024001 seconds and 4 git commands to generate.