aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/syscall/actions/sys_getch.c
diff options
context:
space:
mode:
authorMarvin Borner2020-04-29 00:39:24 +0200
committerMarvin Borner2020-04-29 00:39:24 +0200
commit50858d043cbd6f61cc091c6772f981ca2d6cca6b (patch)
tree82afcc2daf9c4b67d29832923283654913490d06 /src/kernel/syscall/actions/sys_getch.c
parent34c752f6fe4f71169172f1b3e46b1eddf69eba6e (diff)
Added basic exec calls for init and started libc
Diffstat (limited to 'src/kernel/syscall/actions/sys_getch.c')
-rw-r--r--src/kernel/syscall/actions/sys_getch.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/kernel/syscall/actions/sys_getch.c b/src/kernel/syscall/actions/sys_getch.c
index f1e4dfb..91ccda7 100644
--- a/src/kernel/syscall/actions/sys_getch.c
+++ b/src/kernel/syscall/actions/sys_getch.c
@@ -1,10 +1,11 @@
#include <stdint.h>
#include <kernel/lib/stdio.h>
-#include <kernel/input/input.h>
-#include <kernel/lib/lib.h>
-#include <kernel/lib/string.h>
+#include <kernel/io/io.h>
uint32_t sys_getch()
{
- return (uint32_t)getch();
-} \ No newline at end of file
+ sti();
+ uint32_t key = getch();
+ cli();
+ return key;
+}