From 41cba1de51b328979ff2d0261b4141bb4e128fe6 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 15 Jan 2021 16:34:19 +0100 Subject: Implemented basic dev ready-state waiting --- kernel/drivers/keyboard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kernel/drivers') diff --git a/kernel/drivers/keyboard.c b/kernel/drivers/keyboard.c index 6936c22..7e295c2 100644 --- a/kernel/drivers/keyboard.c +++ b/kernel/drivers/keyboard.c @@ -13,6 +13,7 @@ static struct event_keyboard *event = NULL; static struct stack *queue = NULL; +static u32 dev_id = 0; static int state = 0; static int merged = 0; @@ -43,8 +44,7 @@ void keyboard_handler() state = 0; merged = 0; - // TODO: Only enable waiting procs - proc_current()->state = PROC_RUNNING; + proc_enable_waiting(dev_id); } void keyboard_acknowledge(void) @@ -88,4 +88,5 @@ void keyboard_install(void) dev->read = keyboard_read; dev->ready = keyboard_ready; device_add(dev); + dev_id = dev->id; } -- cgit v1.2.3