From e7d88df7a5a7e11677b68303a0d05455bf9a60d6 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 11 Dec 2019 21:22:15 +0100 Subject: Some user-side graphics --- src/kernel/syscall/actions/sys_get_pointers.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/kernel/syscall/actions/sys_get_pointers.c (limited to 'src/kernel/syscall/actions') diff --git a/src/kernel/syscall/actions/sys_get_pointers.c b/src/kernel/syscall/actions/sys_get_pointers.c new file mode 100644 index 0000000..adbdd36 --- /dev/null +++ b/src/kernel/syscall/actions/sys_get_pointers.c @@ -0,0 +1,18 @@ +#include +#include +#include +#include + +struct userspace_pointers { + unsigned char *fb; + struct font *font; +}; + +uint32_t sys_get_pointers() +{ + struct userspace_pointers *pointers = (struct userspace_pointers *) paging_alloc_pages(1); + pointers->fb = fb; + pointers->font = font; + paging_set_user((uint32_t) pointers, 1); + return (uint32_t) pointers; +} \ No newline at end of file -- cgit v1.2.3