std1.0.0-beta-7 SafeC docs

std :: kernel::syscall

Struct std::SyscallTable

#include <std/kernel/syscall.h> source

struct SyscallTable {
    ?fn long long(long long, long long, long long) handlers[SYSCALL_MAX];
    int count;
}

Fields

§?fn long long(long long, long long, long long) handlers[SYSCALL_MAX]source

null = none

§int countsource

number of registered syscalls

Methods

§long long dispatch(int num, long long arg0, long long arg1, long long arg2)source · definition

Dispatch a syscall. Returns the handler's return value, or -1 if not registered.

§int is_registered(int num) constsource · definition

Check if a syscall number is registered.

§static struct SyscallTable new()source · definition

Initialize syscall table (all entries NULL).