diff options
Diffstat (limited to 'src/kernel/syscall/actions')
-rw-r--r-- | src/kernel/syscall/actions/sys_alloc.c | 2 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_free.c | 4 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_get_pointers.c | 13 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_read.c | 16 | ||||
-rw-r--r-- | src/kernel/syscall/actions/sys_write.c | 8 |
5 files changed, 22 insertions, 21 deletions
diff --git a/src/kernel/syscall/actions/sys_alloc.c b/src/kernel/syscall/actions/sys_alloc.c index 24abe4d..65269de 100644 --- a/src/kernel/syscall/actions/sys_alloc.c +++ b/src/kernel/syscall/actions/sys_alloc.c @@ -2,5 +2,5 @@ uint32_t sys_alloc(uint32_t count) { - return 0; // (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 f1a0371..cbd4c70 100644 --- a/src/kernel/syscall/actions/sys_free.c +++ b/src/kernel/syscall/actions/sys_free.c @@ -3,6 +3,6 @@ uint32_t sys_free(uint32_t ptr) { - kfree((void *) ptr); - return 0; + 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 cd824db..181630b 100644 --- a/src/kernel/syscall/actions/sys_get_pointers.c +++ b/src/kernel/syscall/actions/sys_get_pointers.c @@ -4,14 +4,15 @@ #include <kernel/memory/alloc.h> struct userspace_pointers { - unsigned char *fb; - struct font *font; + unsigned char *fb; + struct font *font; }; uint32_t sys_get_pointers() { - struct userspace_pointers *pointers = (struct userspace_pointers *) kmalloc(sizeof(struct userspace_pointers)); - pointers->fb = fb; - pointers->font = font; - return (uint32_t) pointers; + struct userspace_pointers *pointers = + (struct userspace_pointers *)kmalloc(sizeof(struct userspace_pointers)); + pointers->fb = fb; + pointers->font = font; + return (uint32_t)pointers; }
\ No newline at end of file diff --git a/src/kernel/syscall/actions/sys_read.c b/src/kernel/syscall/actions/sys_read.c index ed2cca8..24d83d1 100644 --- a/src/kernel/syscall/actions/sys_read.c +++ b/src/kernel/syscall/actions/sys_read.c @@ -6,16 +6,16 @@ uint32_t sys_read(char *buf) { - keyboard_clear_buffer(); - keyboard_char_buffer = 0; - while (keyboard_char_buffer != '\n') { - getch(); - } - memcpy(buf, keyboard_buffer, strlen(keyboard_buffer)); - return strlen(buf); + keyboard_clear_buffer(); + keyboard_char_buffer = 0; + while (keyboard_char_buffer != '\n') { + getch(); + } + memcpy(buf, keyboard_buffer, strlen(keyboard_buffer)); + return strlen(buf); } uint32_t sys_readc() { - return (uint32_t) getch(); + return (uint32_t)getch(); }
\ No newline at end of file diff --git a/src/kernel/syscall/actions/sys_write.c b/src/kernel/syscall/actions/sys_write.c index f747be8..f15004f 100644 --- a/src/kernel/syscall/actions/sys_write.c +++ b/src/kernel/syscall/actions/sys_write.c @@ -4,12 +4,12 @@ uint32_t sys_write(char *buf) { - printf(buf); - return strlen((const char *) buf); + printf(buf); + return strlen((const char *)buf); } uint32_t sys_writec(char ch) { - writec(ch); - return 0; + writec(ch); + return 0; }
\ No newline at end of file |