Luna/kernel/src/sys/Syscall.h
apio fd8a0175d9
All checks were successful
continuous-integration/drone/push Build is passing
Add a syscall infrastructure (our baby program can print to the console now!)
2023-01-05 22:39:56 +01:00

17 lines
458 B
C

#pragma once
#include "arch/CPU.h"
#include <luna/Result.h>
#include <luna/Syscall.h>
typedef u64 SyscallArgs[6];
typedef Result<u64> (*syscall_func_t)(Registers*, SyscallArgs);
// Invoked by the architecture-dependent system call entry point.
i64 invoke_syscall(Registers*, SyscallArgs, u64 syscall);
#undef __enumerate
#define __enumerate(name) extern Result<u64> sys_##name(Registers*, SyscallArgs);
enumerate_syscalls(__enumerate)
#undef __enumerate