/* * sys/syscall.h — the raw syscall interface. * * syscall() is the ONLY place in nulsl-libc that talks the kernel ABI. * Everything above it (read, write, exit, ...) is a wrapper. * * SYS_* constants below are the x86_64 numbers for the syscalls the libc * itself wraps or its tests use. They are #ifndef-guarded so kernel UAPI * headers can coexist. Extend the table as needed (docs/syscalls.md). */ #ifndef _NULSL_SYS_SYSCALL_H #define _NULSL_SYS_SYSCALL_H #ifdef __cplusplus extern "C" { #endif long syscall(long number, ...); /* x86_64 syscall numbers (Linux ABI). */ #ifndef SYS_read #define SYS_read 0 #endif #ifndef SYS_write #define SYS_write 1 #endif #ifndef SYS_open #define SYS_open 2 #endif #ifndef SYS_close #define SYS_close 3 #endif #ifndef SYS_getpid #define SYS_getpid 39 #endif #ifndef SYS_exit #define SYS_exit 60 #endif #ifndef SYS_unlink #define SYS_unlink 87 #endif #ifndef SYS_clock_gettime #define SYS_clock_gettime 228 #endif #ifdef __cplusplus } #endif #endif /* _NULSL_SYS_SYSCALL_H */