From 59894afa1bc0f4efc85917710adf2e93d7e17a5e Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 7 Feb 2021 16:58:48 +0100 Subject: Added poll syscall --- kernel/drivers/keyboard.c | 2 +- kernel/drivers/mouse.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'kernel/drivers') diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c index 0dd7219..1652625 100644 --- a/kernel/drivers/keyboard.c +++ b/kernel/drivers/keyboard.c @@ -44,7 +44,7 @@ void keyboard_handler() state = 0; merged = 0; - proc_enable_waiting(dev_id); + proc_enable_waiting(dev_id, PROC_WAIT_DEV); } void keyboard_acknowledge(void) diff --git a/kernel/drivers/mouse.c b/kernel/drivers/mouse.c index 2e9ceae..b03ed50 100644 --- a/kernel/drivers/mouse.c +++ b/kernel/drivers/mouse.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -44,8 +45,8 @@ void mouse_handler() event->but2 = (mouse_byte[0] >> 1) & 1; event->but3 = (mouse_byte[0] >> 2) & 1; stack_push_bot(queue, event); - mouse_cycle = 0; + proc_enable_waiting(dev_id, PROC_WAIT_DEV); break; default: break; -- cgit v1.2.3