mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 06:58:22 +00:00
kernel: print syscall
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
section .rodata
|
section .rodata
|
||||||
|
extern syscall_print
|
||||||
syscalltab:
|
syscalltab:
|
||||||
|
dq syscall_print
|
||||||
|
|
||||||
syscallcount equ 0
|
syscallcount equ 1
|
||||||
section .text
|
section .text
|
||||||
global arch_syscall_entry
|
global arch_syscall_entry
|
||||||
; on entry:
|
; on entry:
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
#define _SYSCALLS_H
|
#define _SYSCALLS_H
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <arch/context.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t ret;
|
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