From 50858d043cbd6f61cc091c6772f981ca2d6cca6b Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 29 Apr 2020 00:39:24 +0200 Subject: Added basic exec calls for init and started libc --- src/kernel/syscall/actions/sys_exec.c | 7 +++++++ src/kernel/syscall/actions/sys_getch.c | 11 ++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) create mode 100644 src/kernel/syscall/actions/sys_exec.c (limited to 'src/kernel/syscall/actions') diff --git a/src/kernel/syscall/actions/sys_exec.c b/src/kernel/syscall/actions/sys_exec.c new file mode 100644 index 0000000..dc1e9c6 --- /dev/null +++ b/src/kernel/syscall/actions/sys_exec.c @@ -0,0 +1,7 @@ +#include +#include + +uint32_t sys_exec(char *path) +{ + return uexec(path); +} 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 #include -#include -#include -#include +#include uint32_t sys_getch() { - return (uint32_t)getch(); -} \ No newline at end of file + sti(); + uint32_t key = getch(); + cli(); + return key; +} -- cgit v1.2.3