tty: add the new tty_data_consumed method
authorAlan Cox <alan@linux.intel.com>
Sat, 14 Jul 2018 15:42:04 +0000 (16:42 +0100)
committerAlan Cox <alan@linux.intel.com>
Sat, 14 Jul 2018 15:42:04 +0000 (16:42 +0100)
This is needed for flow control but does mean we need to add a null helper
everywhere.

36 files changed:
Kernel/dev/z80pack/devtty.c
Kernel/devio.c
Kernel/platform-amstradnc/devtty.c
Kernel/platform-appleiie/devtty.c
Kernel/platform-atarist/devtty.c
Kernel/platform-coco2/devtty.c
Kernel/platform-coco2cart/devtty.c
Kernel/platform-coco3/devtty.c
Kernel/platform-cromemco/devtty.c
Kernel/platform-dragon-nx32/devtty.c
Kernel/platform-ibmpc/devtty.c
Kernel/platform-micropack/devtty.c
Kernel/platform-msp430fr5969/devtty.c
Kernel/platform-msx1/devtty.c
Kernel/platform-msx2/devtty.c
Kernel/platform-mtx/devtty.c
Kernel/platform-multicomp09/devtty.c
Kernel/platform-n8vem-mark4/devtty.c
Kernel/platform-p112/devtty.c
Kernel/platform-pcw8256/devtty.c
Kernel/platform-pdp11/devtty.c
Kernel/platform-plus3/devtty.c
Kernel/platform-px4plus/devtty.c
Kernel/platform-rc2014/devtty.c
Kernel/platform-socz80/devtty.c
Kernel/platform-tgl6502/devtty.c
Kernel/platform-trs80/devtty.c
Kernel/platform-ubee/devtty.c
Kernel/platform-v65/devtty.c
Kernel/platform-v65c816-big/devtty.c
Kernel/platform-v65c816/devtty.c
Kernel/platform-v68-banked/devtty.c
Kernel/platform-v68-softmmu/devtty.c
Kernel/platform-v68/devtty.c
Kernel/platform-zeta-v2/devtty.c
Kernel/platform-zx128/devtty.c

index 38a76ee..380271a 100644 (file)
@@ -126,3 +126,7 @@ int tty_carrier(uint8_t minor)
     used(minor);
     return 1;
 }
+
+void tty_data_consumed(uint8_t minor)
+{
+}
index 3ed6b31..e8a2697 100644 (file)
@@ -549,16 +549,14 @@ bool uninsq(struct s_queue *q, unsigned char *cp)
        return r;
 }
 
-// WRS: this isn't used
-// /* Returns true if the queue has more characters than its wakeup number
-//  */
-// bool fullq(struct s_queue *q)
-// {
-//     if (q->q_count > q->q_wakeup) // WRS: shouldn't this be >= ?
-//         return true;
-//     else
-//         return false;
-// }
+/* Returns true if the queue has more characters than its wakeup number */
+bool fullq(struct s_queue *q)
+{
+    if (q->q_count > q->q_wakeup) // WRS: shouldn't this be >= ?
+        return true;
+    else
+        return false;
+}
 
 /*********************************************************************
              Miscellaneous helpers
index 3082757..beb9073 100644 (file)
@@ -117,6 +117,10 @@ void tty_putc(uint8_t minor, unsigned char c)
        uarta = c;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Called to set baud rate etc */
 void tty_setup(uint8_t minor)
 {
index e885c79..f31ced1 100644 (file)
@@ -62,6 +62,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Beware - this kbd access also disables 80store */
 void tty_poll(void)
 {
index 659a28e..9122294 100644 (file)
@@ -72,6 +72,10 @@ void tty_sleeping(uint8_t minor)
        /* For now.. probably worth using tx ints */
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_interrupt(void)
 {
        uint8_t r = *uart_status;
index 1c7fc8b..41788df 100644 (file)
@@ -87,6 +87,10 @@ void tty_interrupt(void)
        }       
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 uint8_t keymap[8];
 static uint8_t keyin[8];
 static uint8_t keybyte, keybit;
index a8344ea..f9e4804 100644 (file)
@@ -67,6 +67,10 @@ void tty_sleeping(uint8_t minor)
     used(minor);
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* 6551 mode handling */
 
 static uint8_t baudbits[] = {
index 98ae7fd..2918978 100644 (file)
@@ -274,6 +274,10 @@ void tty_interrupt(void)
 
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 uint8_t keymap[8];
 static uint8_t keyin[8];
 static uint8_t keybyte, keybit;
index d62c586..99d534d 100644 (file)
@@ -51,6 +51,10 @@ void tty_sleeping(uint8_t minor)
     ttypoll |= 1 << minor;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 __sfr __at 0x08 timer4;
 
 void tty_irq(uint8_t minor)
index 131bb7d..c99b766 100644 (file)
@@ -145,6 +145,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_interrupt(void)
 {
        uint8_t r = *uart_status;
index 8b72096..b140c02 100644 (file)
@@ -50,3 +50,7 @@ int tty_carrier(uint8_t minor)
 void tty_sleeping(uint8_t minor)
 {
 }
+
+void tty_data_consumed(uint8_t minor)
+{
+}
index cf62e54..9c50cf4 100644 (file)
@@ -41,6 +41,10 @@ void tty_sleeping(uint8_t minor)
     used(minor);
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Called every timer tick */
 void tty_pollirq(void)
 {
index 74b77e1..b79c106 100644 (file)
@@ -51,6 +51,10 @@ int tty_carrier(uint8_t minor)
     return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_interrupt(void)
 {
        tty_inproc(minor(BOOT_TTY), UCA0RXBUF);
index b33593e..84cfcff 100644 (file)
@@ -66,6 +66,9 @@ void tty_sleeping(uint8_t minor)
        minor;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
 
 #if 0
 static uint8_t keymap[10];
index 31f0ffa..a41b719 100644 (file)
@@ -96,6 +96,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_setup(uint8_t minor)
 {
        minor;
index a28ee12..0edf18b 100644 (file)
@@ -100,6 +100,11 @@ void tty_sleeping(uint8_t minor)
        used(minor);
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+       /* FIXME:we can now implement flow control stuff */
+}
+
 static uint8_t dart_setup[] = {
        1, 0x19,
        2, 0x04,        /* Vector */
index 2ce8371..41a7784 100644 (file)
@@ -153,6 +153,9 @@ void tty_interrupt(void)
 
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
 
 
 void platform_interrupt(void)
index 950bdf7..7d723c8 100644 (file)
@@ -80,6 +80,10 @@ void tty_sleeping(uint8_t minor)
     minor;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 ttyready_t tty_writeready(uint8_t minor)
 {
     minor;
index c11c303..94e2b7c 100644 (file)
@@ -305,3 +305,7 @@ void kputchar(char c)
     if(c == '\n')
         tty_putc(TTYDEV & 0xFF, '\r');
 }
+
+void tty_data_consumed(uint8_t minor)
+{
+}
index ed6f5a0..116c695 100644 (file)
@@ -131,6 +131,10 @@ void tty_sleeping(uint8_t minor)
     minor;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Pending better ioctl bits set up for 9600 8N1 */
 
 void tty_init_port(void)
index eb00d3a..c6f25e2 100644 (file)
@@ -51,6 +51,10 @@ void tty_sleeping(uint8_t minor)
 {
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Currently run off the timer */
 void tty_interrupt(void)
 {
index 7f16026..bb9e887 100644 (file)
@@ -92,6 +92,10 @@ void tty_sleeping(uint8_t minor)
        minor;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void update_keyboard(void)
 {
        /* We need this assembler code because SDCC __sfr cannot handle 16-bit addresses. And because it is much faster, of course  */
index c3a2fe0..03c6c3c 100644 (file)
@@ -58,6 +58,10 @@ int tty_carrier(uint8_t minor)
     return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /*
  *     Keyboard interface. This is not a make break interface except for
  *     the shift keys. We don't support item keyboards just the standard
index 2b47b7d..e7bf9b4 100644 (file)
@@ -146,6 +146,10 @@ ttyready_t tty_writeready(uint8_t minor)
        return TTY_READY_NOW;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* kernel writes to system console -- never sleep! */
 void kputchar(char c)
 {
index 6065ee2..bba94fc 100644 (file)
@@ -40,4 +40,8 @@ int tty_carrier(uint8_t minor)
 void tty_sleeping(uint8_t minor)
 {
     minor;
-}
\ No newline at end of file
+}
+
+void tty_data_consumed(uint8_t minor)
+{
+}
index c53d65b..de7c3e2 100644 (file)
@@ -58,6 +58,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_poll(void)
 {
         uint8_t x;
index d5e94f2..fecaa8f 100644 (file)
@@ -183,6 +183,11 @@ void tty_sleeping(uint8_t minor)
         used(minor);
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+    /* FIXME: flow control as implemented now for Model I and III */
+}
+
 uint8_t keymap[8];
 static uint8_t keyin[8];
 static uint8_t keybyte, keybit;
index 5c8d94c..4b89025 100644 (file)
@@ -75,6 +75,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 static uint8_t keymap[15];
 static uint8_t keyin[15];
 static uint8_t keybyte, keybit;
index 9895ea3..04f0fd6 100644 (file)
@@ -57,6 +57,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_poll(void)
 {
         uint8_t x;
index 6117fdf..944adf7 100644 (file)
@@ -53,6 +53,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_poll(void)
 {
         uint8_t x;
index ee6df79..49b63d4 100644 (file)
@@ -102,6 +102,10 @@ int tty_carrier(uint8_t minor)
        return 1;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void tty_poll(void)
 {
         uint8_t x;
index 3954fa8..014f31c 100644 (file)
@@ -48,6 +48,10 @@ void tty_sleeping(uint8_t minor)
 {
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Currently run off the timer */
 void tty_interrupt(void)
 {
index 3954fa8..014f31c 100644 (file)
@@ -48,6 +48,10 @@ void tty_sleeping(uint8_t minor)
 {
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Currently run off the timer */
 void tty_interrupt(void)
 {
index 3954fa8..014f31c 100644 (file)
@@ -48,6 +48,10 @@ void tty_sleeping(uint8_t minor)
 {
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 /* Currently run off the timer */
 void tty_interrupt(void)
 {
index b69c4d8..2eb7bf2 100644 (file)
@@ -134,6 +134,10 @@ void tty_sleeping(uint8_t minor)
        }
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 ttyready_t tty_writeready(uint8_t minor)
 {
        uint8_t c;
index 7f16026..bb9e887 100644 (file)
@@ -92,6 +92,10 @@ void tty_sleeping(uint8_t minor)
        minor;
 }
 
+void tty_data_consumed(uint8_t minor)
+{
+}
+
 void update_keyboard(void)
 {
        /* We need this assembler code because SDCC __sfr cannot handle 16-bit addresses. And because it is much faster, of course  */