diff options
author | Marvin Borner | 2020-04-29 19:21:29 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-29 19:21:29 +0200 |
commit | 4546c75d685475d8b9f215b588364e1d1bbd0b79 (patch) | |
tree | 2077f72ad46dfe877f7febdd0692edc139fd7937 /src/kernel/syscall/actions | |
parent | 396d7d303d3bf0e796d0c817883ec1dec928352a (diff) |
MUCH work in libc
Also cleaned up some syscalls etc
Diffstat (limited to 'src/kernel/syscall/actions')
-rw-r--r-- | src/kernel/syscall/actions/sys_getch.c | 11 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_pointers.c | 11 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_scancode.c | 11 |
3 files changed, 12 insertions, 21 deletions
diff --git a/src/kernel/syscall/actions/sys_getch.c b/src/kernel/syscall/actions/sys_getch.c deleted file mode 100644 index 3ce1f8c..0000000 --- a/src/kernel/syscall/actions/sys_getch.c +++ /dev/null @@ -1,11 +0,0 @@ -#include <stdint.h> -#include <kernel/lib/stdio.h> -#include <kernel/io/io.h> - -uint32_t sys_getch() -{ - sti(); - uint32_t key = getch(); - cli(); - return key; -}
\ No newline at end of file diff --git a/src/kernel/syscall/actions/sys_pointers.c b/src/kernel/syscall/actions/sys_pointers.c index ced95de..6cf50ae 100644 --- a/src/kernel/syscall/actions/sys_pointers.c +++ b/src/kernel/syscall/actions/sys_pointers.c @@ -12,17 +12,8 @@ struct pointers { uint32_t sys_pointers() { - struct vbe_mode_info *ret = (struct vbe_mode_info *)umalloc(sizeof(struct vbe_mode_info)); - ret->attributes = current_mode_info->attributes; - ret->pitch = current_mode_info->pitch; - ret->width = current_mode_info->width; - ret->height = current_mode_info->height; - ret->bpp = current_mode_info->bpp; - ret->memory_model = current_mode_info->memory_model; - ret->framebuffer = current_mode_info->framebuffer; - struct pointers *pointers = umalloc(sizeof(struct pointers)); - pointers->current_mode_info = ret; + pointers->current_mode_info = current_mode_info; pointers->font = font; return pointers; diff --git a/src/kernel/syscall/actions/sys_scancode.c b/src/kernel/syscall/actions/sys_scancode.c new file mode 100644 index 0000000..612326a --- /dev/null +++ b/src/kernel/syscall/actions/sys_scancode.c @@ -0,0 +1,11 @@ +#include <stdint.h> +#include <kernel/input/input.h> +#include <kernel/io/io.h> + +uint32_t sys_scancode() +{ + sti(); + uint32_t key = wait_scancode(); + cli(); + return key; +}
\ No newline at end of file |