aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorMarvin Borner2021-02-07 16:58:48 +0100
committerMarvin Borner2021-02-07 16:58:48 +0100
commit59894afa1bc0f4efc85917710adf2e93d7e17a5e (patch)
treeeafaa21081430de4a0d09d8ac963ddc4e2f21a00 /kernel/drivers
parenteca4dfd49216f6158df69143994a18a0b3edd4fe (diff)
Added poll syscall
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/keyboard.c2
-rw-r--r--kernel/drivers/mouse.c3
2 files changed, 3 insertions, 2 deletions
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 <interrupts.h>
#include <mem.h>
#include <print.h>
+#include <proc.h>
#include <stack.h>
#include <str.h>
#include <sys.h>
@@ -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;