diff options
author | Marvin Borner | 2020-01-20 23:12:54 +0100 |
---|---|---|
committer | Marvin Borner | 2020-01-20 23:12:54 +0100 |
commit | 391ed256d21a6ae2e2456d1809f357e6e96e15d1 (patch) | |
tree | 0fe9ffb3c59bbfeb3d8a04ab7fc6efba60d81e79 /src/kernel/syscall | |
parent | d5d1749257ff8b9aa6b5ace4b4720b484a2860f3 (diff) |
Added pure awesomeness
Actually quite some days of work but ok
Diffstat (limited to 'src/kernel/syscall')
-rw-r--r-- | src/kernel/syscall/actions/sys_alloc.c | 3 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_free.c | 4 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_get_pointers.c | 4 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_write.c | 2 | ||||
-rw-r--r-- | src/kernel/syscall/syscall.c | 3 |
5 files changed, 6 insertions, 10 deletions
diff --git a/src/kernel/syscall/actions/sys_alloc.c b/src/kernel/syscall/actions/sys_alloc.c index 6579e0e..24abe4d 100644 --- a/src/kernel/syscall/actions/sys_alloc.c +++ b/src/kernel/syscall/actions/sys_alloc.c @@ -1,7 +1,6 @@ #include <stdint.h> -#include <kernel/lib/stdlib/liballoc.h> uint32_t sys_alloc(uint32_t count) { - return (uint32_t) umalloc(count); + return 0; // (uint32_t) umalloc(count); }
\ No newline at end of file diff --git a/src/kernel/syscall/actions/sys_free.c b/src/kernel/syscall/actions/sys_free.c index 6c3a82f..5f52564 100644 --- a/src/kernel/syscall/actions/sys_free.c +++ b/src/kernel/syscall/actions/sys_free.c @@ -1,8 +1,8 @@ #include <stdint.h> -#include <kernel/lib/stdlib/liballoc.h> +#include <kernel/memory/kheap.h> uint32_t sys_free(uint32_t ptr) { - ufree((void *) ptr); + kfree((void *) ptr); return 0; }
\ No newline at end of file diff --git a/src/kernel/syscall/actions/sys_get_pointers.c b/src/kernel/syscall/actions/sys_get_pointers.c index 554f4eb..8e34ddd 100644 --- a/src/kernel/syscall/actions/sys_get_pointers.c +++ b/src/kernel/syscall/actions/sys_get_pointers.c @@ -1,7 +1,7 @@ #include <stdint.h> #include <kernel/graphics/vesa.h> #include <kernel/graphics/font.h> -#include <kernel/lib/stdlib/liballoc.h> +#include <kernel/memory/kheap.h> struct userspace_pointers { unsigned char *fb; @@ -10,7 +10,7 @@ struct userspace_pointers { uint32_t sys_get_pointers() { - struct userspace_pointers *pointers = (struct userspace_pointers *) umalloc(sizeof(struct userspace_pointers)); + struct userspace_pointers *pointers = (struct userspace_pointers *) kmalloc(sizeof(struct userspace_pointers)); pointers->fb = fb; pointers->font = font; return (uint32_t) pointers; diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c index 76d88b8..f747be8 100644 --- a/src/kernel/syscall/actions/sys_write.c +++ b/src/kernel/syscall/actions/sys_write.c @@ -10,6 +10,6 @@ uint32_t sys_write(char *buf) uint32_t sys_writec(char ch) { - writec((char) ch); + writec(ch); return 0; }
\ No newline at end of file diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index 93abc83..367fe30 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -3,7 +3,6 @@ #include <kernel/interrupts/interrupts.h> #include <kernel/system.h> #include <kernel/lib/stdio.h> -#include <kernel/paging/paging.h> typedef uint32_t (*syscall_func)(unsigned int, ...); @@ -22,7 +21,6 @@ uint32_t (*syscalls[])() = { void syscall_handler(struct regs *r) { - paging_switch_directory(0); serial_printf("Received syscall!"); if (r->eax >= sizeof(syscalls) / sizeof(*syscalls)) @@ -35,7 +33,6 @@ void syscall_handler(struct regs *r) //serial_printf("[SYSCALL] %d (0x%x) 0x%x 0x%x 0x%x 0x%x 0x%x", r->eax, location, r->ebx, r->ecx, r->edx, r->esi, r->edi); r->eax = location(r->ebx, r->ecx, r->edx, r->esi, r->edi); - paging_switch_directory(1); } void syscalls_install() |