diff options
author | dzwdz | 2022-04-07 21:25:54 +0200 |
---|---|---|
committer | dzwdz | 2022-04-07 21:25:54 +0200 |
commit | 86623b76dce72bc611f470e0e9ecad963fd558b2 (patch) | |
tree | e9f1204a3761e4389e4b51276c7d359957f4fb86 /src/kernel/arch/i386/driver/serial.c | |
parent | da2bbef4e4f586ecf13cd5ffe9a62df3114a3483 (diff) |
kernel: remove the `/tty` device
Diffstat (limited to 'src/kernel/arch/i386/driver/serial.c')
-rw-r--r-- | src/kernel/arch/i386/driver/serial.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/kernel/arch/i386/driver/serial.c b/src/kernel/arch/i386/driver/serial.c index d2c34e7..14bb8fd 100644 --- a/src/kernel/arch/i386/driver/serial.c +++ b/src/kernel/arch/i386/driver/serial.c @@ -44,12 +44,11 @@ bool serial_poll_read(char *c) { size_t serial_read(char *buf, size_t len) { irq_interrupt_flag(true); for (size_t i = 0; i < len; i++) { - for (;;) { - if (serial_poll_read(&buf[i])) break; + while (!serial_poll_read(&buf[i])) asm("hlt" ::: "memory"); - } } irq_interrupt_flag(false); + // TODO root driver assumes no partial reads return len; } |