Expand description
Table-driven Darwin BSD syscall dispatch (arm64, number in x16).
Error ABI (Darwin arm64): success clears PSTATE.C and places the return
value in x0; failure sets PSTATE.C and places a positive errno in
x0. The trap handler applies the carry bit from SyscallResult::error.
Modules:
- [
table] — numbers / names - [
fd] — FD table, open/close/dup/lseek/fcntl/openat - [
io] — read/write - [
fs] — access/stat/fstat - [
mem_sys] — mmap/mprotect/munmap/msync - [
process] — exit/getpid/getppid/issetugid - [
thread_sys] — bsdthread_*/thread_selfid - [
time_sys] — gettimeofday/clock_gettime - [
sysctl] — sysctl/sysctlbyname - [
signal] — sigprocmask/sigaction (soft) - [
net] — pipe/socket/connect/poll/select (curl G3)
Structs§
- Syscall
Args - Arguments for one BSD syscall (AArch64 Darwin convention).
- Syscall
Result - Result of dispatching one syscall.
Enums§
- BsdSyscall
- Known BSD syscalls we dispatch (subset of XNU
syscalls.master).
Constants§
Functions§
- dispatch
- Dispatches a Darwin BSD syscall by number.
- known_
syscalls - Snapshot of the table used by unit tests / docs.
- lookup
- Looks up a syscall by Darwin number (includes NOCANCEL / 64-bit aliases).
- name_of
- Name for a raw number, if known.
- reset_
syscall_ state - Resets FD table, soft signal state, and syscall counter for a new run.