mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
kernel: print syscall
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _SYSCALLS_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <arch/context.h>
|
||||
|
||||
typedef struct {
|
||||
uint64_t ret;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user