code wiki / (root) / syscalls.nx

syscalls.nx source

↩ module page · 20 lines · 967 B

1// syscalls.nx -- alias stub. 2// 3// nx_syscalls.nx is the canonical syscall surface: same 15 funcs 4// this file used to define (sys_write/read/mmap/openat/close/exit/ 5// brk/lseek/getpid/kill/fork/execve/wait4/clone/ioctl) plus 9 6// additions for sockets and time (sys_socket/bind/listen/accept/ 7// connect/clock_gettime_mono/now_ms/sleep_ms/openat_append). 8// 9// Consumers using `import "syscalls.nx"` resolve via NishiLang's 10// textual import splicing with path-dedup (runtime/import.nx I1): 11// this stub splices nx_syscalls.nx once, and any other file that 12// also imports "nx_syscalls.nx" directly gets deduped to the same 13// canonical splice. No duplicate symbols. This fixed the 14// nxasm_main.nx duplicate-symbol error on first link 2026-05-19. 15// 16// Deprecation: when every "syscalls.nx" consumer migrates to the 17// nx_-prefixed name, delete this stub. bench/nx_import_closure.sh 18// will catch any straggler before the build ships. 19 20import "nx_syscalls.nx"