diff options
author | Marvin Borner | 2020-04-29 00:39:24 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-29 00:39:24 +0200 |
commit | 50858d043cbd6f61cc091c6772f981ca2d6cca6b (patch) | |
tree | 82afcc2daf9c4b67d29832923283654913490d06 /src/kernel/syscall/actions | |
parent | 34c752f6fe4f71169172f1b3e46b1eddf69eba6e (diff) |
Added basic exec calls for init and started libc
Diffstat (limited to 'src/kernel/syscall/actions')
-rw-r--r-- | src/kernel/syscall/actions/sys_exec.c | 7 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_getch.c | 11 |
2 files changed, 13 insertions, 5 deletions
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 <stdint.h> +#include <kernel/tasks/process.h> + +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 <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; +} |