diff options
Diffstat (limited to 'src/kernel/arch/i386/tty/tty.c')
-rw-r--r-- | src/kernel/arch/i386/tty/tty.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/kernel/arch/i386/tty/tty.c b/src/kernel/arch/i386/tty/tty.c index ebe0fd3..ab15aba 100644 --- a/src/kernel/arch/i386/tty/tty.c +++ b/src/kernel/arch/i386/tty/tty.c @@ -1,5 +1,4 @@ -#include <kernel/arch/i386/interrupts/irq.h> -#include <kernel/arch/i386/tty/serial.h> +#include <kernel/arch/i386/driver/serial.h> #include <kernel/arch/i386/tty/vga.h> #include <kernel/arch/io.h> @@ -13,14 +12,7 @@ void tty_init(void) { } void tty_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; - asm("hlt" ::: "memory"); - } - } - irq_interrupt_flag(false); + serial_read(buf, len); } void tty_write(const char *buf, size_t len) { |