From 6fe8073de975ad7722043f9173fec068178e2eac Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 14 Jul 2024 19:19:35 +0200 Subject: kernel: rework postqueue Keeping its old name for now to make things easier for myself. This might just be replaced by sys/queue.h soon. --- src/kernel/arch/amd64/driver/ps2.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/kernel/arch/amd64/driver/ps2.c') diff --git a/src/kernel/arch/amd64/driver/ps2.c b/src/kernel/arch/amd64/driver/ps2.c index f0c5f2c..86fcffd 100644 --- a/src/kernel/arch/amd64/driver/ps2.c +++ b/src/kernel/arch/amd64/driver/ps2.c @@ -19,8 +19,8 @@ static volatile ring_t mouse_backlog = {(void*)mouse_buf, sizeof mouse_buf, 0, 0 static void accept(VfsReq *req); static void ps2_irq(void); -static VfsReq *kb_queue = NULL; -static VfsReq *mouse_queue = NULL; +static ReqQueue kb_queue; +static ReqQueue mouse_queue; static void wait_out(void) { while ((port_in8(PS2 + 4) & 2) != 0); @@ -58,6 +58,9 @@ void ps2_init(void) { irq_fn[IRQ_PS2KB] = ps2_irq; irq_fn[IRQ_PS2MOUSE] = ps2_irq; + postqueue_init(&kb_queue); + postqueue_init(&mouse_queue); + vfs_root_register("/dev/ps2/", accept); } -- cgit v1.2.3