summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/driver/ps2.c
diff options
context:
space:
mode:
authordzwdz2024-07-14 19:19:35 +0200
committerdzwdz2024-07-14 19:19:35 +0200
commit6fe8073de975ad7722043f9173fec068178e2eac (patch)
tree9427bb0368e25609eea66fa52567b57522b0e0aa /src/kernel/arch/amd64/driver/ps2.c
parentb3a86647b644db30f5fd70bd651c44f681962a9b (diff)
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.
Diffstat (limited to 'src/kernel/arch/amd64/driver/ps2.c')
-rw-r--r--src/kernel/arch/amd64/driver/ps2.c7
1 files changed, 5 insertions, 2 deletions
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);
}