From 881be872675e4cff153c27c641980451c4a3f479 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 14 Jul 2024 19:40:31 +0200 Subject: kernel: make the adhoc VfsQueue queues use ReqQueue instead I'm still not sure if I should use sys/queue.h for this. But yeah, this is more consistent, and it will also let me switch over to O(1) insertions later on. --- src/kernel/arch/amd64/driver/serial.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/kernel/arch/amd64/driver/serial.c') diff --git a/src/kernel/arch/amd64/driver/serial.c b/src/kernel/arch/amd64/driver/serial.c index eb347d0..76ec33b 100644 --- a/src/kernel/arch/amd64/driver/serial.c +++ b/src/kernel/arch/amd64/driver/serial.c @@ -22,7 +22,7 @@ void serial_init(void) { if (COM1_exists) { vfs_root_register("/dev/com1", accept); } - postqueue_init(&hung_reads); + reqqueue_init(&hung_reads); } static bool serial_selftest(void) { @@ -58,7 +58,7 @@ void serial_preinit(void) { static void serial_irq(void) { ring_put1b((void*)&backlog, port_in8(COM1)); - postqueue_ringreadall(&hung_reads, (void*)&backlog); + reqqueue_ringreadall(&hung_reads, (void*)&backlog); } @@ -81,8 +81,8 @@ static void accept(VfsReq *req) { vfsreq_finish_short(req, valid ? 0 : -1); break; case VFSOP_READ: - postqueue_join(&hung_reads, req); - postqueue_ringreadall(&hung_reads, (void*)&backlog); + reqqueue_join(&hung_reads, req); + reqqueue_ringreadall(&hung_reads, (void*)&backlog); break; case VFSOP_WRITE: if (req->caller && !req->flags) { -- cgit v1.2.3