Luna/kernel/src/sys/Syscall.h
apio 3f1e6fc2ff
Some checks failed
continuous-integration/drone/push Build is failing
libluna+kernel: Move luna/Syscall.h to the kernel API directory
A kernel-specific header has nothing to do in libluna.
2023-08-23 14:35:21 +02:00

17 lines
457 B
C

#pragma once
#include "api/Syscall.h"
#include "arch/CPU.h"
#include <luna/Result.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