Files
sakurac/system/linux/linux.sakura
T

26 lines
1003 B
Plaintext
Raw Permalink Normal View History

2026-10-26 10:14:11 -05:00
#! @file linux.sakura
#! @author John Christman (sorakatadzuma@gmail.com)
#! @copyright Malunal Studios, LLC.
#! @license MIT
#!
#! Contains `system::linux`: what Linux gives a program, declared once for std
#! and anything else that reaches the system itself. A program reaches Linux by
#! system calls, whose numbers and the layouts of what they read and write
#! differ by processor, so each processor's are in a file of its own, as
#! `x86_64.sakura`.
module system::linux when os == linux;
#! Makes a system call, as the operations here do. Its numbers, and what it
#! reads and writes, are the system's, and differ by processor.
#! @param n The number of the call.
#! @param a Its first argument.
#! @param b Its second.
#! @param c Its third.
#! @param d Its fourth.
#! @param e Its fifth.
#! @param f Its sixth.
#! @returns What the call gives, or the negated error number where it fails.
@intrinsic
pub def syscall(n: i64, a: u64, b: u64, c: u64, d: u64, e: u64, f: u64): i64;