summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386/tty/tty.c
diff options
context:
space:
mode:
authordzwdz2022-03-27 14:47:50 +0200
committerdzwdz2022-03-27 14:47:50 +0200
commit45283c43460900d080478973c873339b5db3013e (patch)
treecde5d7afdf54fa57b07c8aa5f2a61cc663261445 /src/kernel/arch/i386/tty/tty.c
parentcc16c5d9847da67b3ff369c13712fcae4bebe2ae (diff)
kernel/tty: poll only on IRQs, don't burn cycles
Diffstat (limited to 'src/kernel/arch/i386/tty/tty.c')
-rw-r--r--src/kernel/arch/i386/tty/tty.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kernel/arch/i386/tty/tty.c b/src/kernel/arch/i386/tty/tty.c
index f3fecf3..a63c16a 100644
--- a/src/kernel/arch/i386/tty/tty.c
+++ b/src/kernel/arch/i386/tty/tty.c
@@ -19,6 +19,7 @@ void tty_read(char *buf, size_t len) {
for (;;) {
if (serial_poll_read(&buf[i])) break;
if (keyboard_poll_read(&buf[i])) break;
+ asm("hlt" ::: "memory");
}
}
}