aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorMarvin Borner2021-01-15 16:34:19 +0100
committerMarvin Borner2021-01-15 16:34:19 +0100
commit41cba1de51b328979ff2d0261b4141bb4e128fe6 (patch)
tree88ea7bda9e7a675ed0e043ea8662ea9cf3767ce3 /kernel/drivers
parentd3924f541f36bc08fed87f25ec7fc6e64b86e511 (diff)
Implemented basic dev ready-state waiting
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/keyboard.c5
1 files changed, 3 insertions, 2 deletions
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;
}