kernel: print syscall

This commit is contained in:
Matheus
2023-05-07 20:36:58 -03:00
parent 2a0103fc46
commit 94057abfaf
3 changed files with 15 additions and 1 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
section .rodata
extern syscall_print
syscalltab:
dq syscall_print
syscallcount equ 0
syscallcount equ 1
section .text
global arch_syscall_entry
; on entry:
+1
View File
@@ -2,6 +2,7 @@
#define _SYSCALLS_H
#include <stdint.h>
#include <arch/context.h>
typedef struct {
uint64_t ret;
+11
View File
@@ -0,0 +1,11 @@
#include <kernel/syscalls.h>
#include <printf.h>
syscallret_t syscall_print(context_t *context, char *message) {
syscallret_t ret = {
.ret = 0,
.errno = 0
};
printf("%s\n", message);
return ret;
}