From: Alan Cox Date: Sat, 19 Jan 2019 21:32:30 +0000 (+0000) Subject: sc114: fix console blocking X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=a9a6939b2388d8eb1ef47c7f199c05c4ba81d781;p=FUZIX.git sc114: fix console blocking --- diff --git a/Kernel/platform-sc114/devtty.c b/Kernel/platform-sc114/devtty.c index 69b299c7..58c8422e 100644 --- a/Kernel/platform-sc114/devtty.c +++ b/Kernel/platform-sc114/devtty.c @@ -127,7 +127,9 @@ void tty_data_consumed(uint8_t minor) /* kernel writes to system console -- never sleep! */ void kputchar(char c) { - tty_putc(TTYDEV - 512, c); + while(tty_writeready(TTYDEV - 512) != TTY_READY_NOW); if (c == '\n') tty_putc(TTYDEV - 512, '\r'); + while(tty_writeready(TTYDEV - 512) != TTY_READY_NOW); + tty_putc(TTYDEV - 512, c); }