diff options
author | Marvin Borner | 2020-04-29 13:19:32 +0200 |
---|---|---|
committer | Marvin Borner | 2020-04-29 13:19:32 +0200 |
commit | 4f3c75d23188bd480739d6d1514543c95cfe3399 (patch) | |
tree | d7306d1e5496becadee6514e3e50bdfc2e37f3e0 /src/kernel/syscall | |
parent | 50858d043cbd6f61cc091c6772f981ca2d6cca6b (diff) |
Started libgui implementation
Diffstat (limited to 'src/kernel/syscall')
-rw-r--r-- | src/kernel/syscall/actions/sys_exec.c | 2 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_getch.c | 2 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_pointers.c | 18 | ||||
-rw-r--r-- | src/kernel/syscall/syscall.c | 5 | ||||
-rw-r--r-- | src/kernel/syscall/syscall.h | 4 |
5 files changed, 26 insertions, 5 deletions
diff --git a/src/kernel/syscall/actions/sys_exec.c b/src/kernel/syscall/actions/sys_exec.c index dc1e9c6..000d185 100644 --- a/src/kernel/syscall/actions/sys_exec.c +++ b/src/kernel/syscall/actions/sys_exec.c @@ -4,4 +4,4 @@ uint32_t sys_exec(char *path) { return uexec(path); -} +}
\ No newline at end of file diff --git a/src/kernel/syscall/actions/sys_getch.c b/src/kernel/syscall/actions/sys_getch.c index 91ccda7..3ce1f8c 100644 --- a/src/kernel/syscall/actions/sys_getch.c +++ b/src/kernel/syscall/actions/sys_getch.c @@ -8,4 +8,4 @@ uint32_t sys_getch() 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 new file mode 100644 index 0000000..1a2d8f7 --- /dev/null +++ b/src/kernel/syscall/actions/sys_pointers.c @@ -0,0 +1,18 @@ +#include <stdint.h> +#include <kernel/graphics/vesa.h> +#include <kernel/fs/load.h> +#include <kernel/memory/alloc.h> + +struct pointers { + uint8_t *fb; + struct font *font; +}; + +uint32_t sys_pointers() +{ + struct pointers *pointers = kmalloc(sizeof(struct pointers)); + pointers->fb = fb; + pointers->font = font; + + return pointers; +}
\ No newline at end of file diff --git a/src/kernel/syscall/syscall.c b/src/kernel/syscall/syscall.c index d0b2b96..af59499 100644 --- a/src/kernel/syscall/syscall.c +++ b/src/kernel/syscall/syscall.c @@ -12,7 +12,8 @@ uint32_t (*syscalls[])() = { [0] = (uint32_t(*)())halt_loop, // DEBUG! [2] = (uint32_t(*)())sys_putch, [3] = sys_getch, [4] = sys_malloc, - [5] = sys_free }; + [5] = sys_free, + [6] = sys_pointers }; void syscall_handler(struct regs *r) { @@ -36,4 +37,4 @@ void syscall_handler(struct regs *r) void syscalls_install() { isr_install_handler(0x80, syscall_handler); -} +}
\ No newline at end of file diff --git a/src/kernel/syscall/syscall.h b/src/kernel/syscall/syscall.h index 5c21d58..b0a15c4 100644 --- a/src/kernel/syscall/syscall.h +++ b/src/kernel/syscall/syscall.h @@ -17,4 +17,6 @@ uint32_t sys_malloc(uint32_t count); uint32_t sys_free(uint32_t ptr); -#endif +uint32_t sys_pointers(); + +#endif
\ No newline at end of file |