code wiki / (root) / nx_readcap_gate.nx

nx_readcap_gate.nx

buildroot/runtime/nx_readcap_gate.nx

6353 B108 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_readcap_gate.nx -- teeth for nx_readcap_lib: the ONE read-into-cap helper names every outcome the hand-rolled loops could not. In-process (the lib is imported), fixtures built at SETUP under /tmp/nx_readcap/ (the gate-fixture law), every tooth prints its values, and the negative controls are named so the census can see them. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_readcap_lib.nx nx_readcap_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nxnx_readcap_lib.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ rg_mkdir sys_mmap ↻ sys_munmap sys_unlinkat gv_check gv_puts ↻ rg_write_fixture sys_mmap ↻ sys_openat_wr sys_write ↻ sys_close sys_mmap ↻ rc_read_file_into sys_openat_rd rc_fill_file rc_fill sys_read sys_mmap ↻ sys_read ↻ sys_close ↻

structs

none

consts

9const RG_DIR: *u8 = "/tmp/nx_readcap" as *u8
10const RG_SMALL: *u8 = "/tmp/nx_readcap/small.bin" as *u8
11const RG_BIG: *u8 = "/tmp/nx_readcap/big.bin" as *u8
12const RG_EXACT: *u8 = "/tmp/nx_readcap/exact.bin" as *u8
13const RG_ABSENT: *u8 = "/tmp/nx_readcap/absent.bin" as *u8
14const RG_CAP: i64 = 1000
15const RG_SMALL_N: i64 = 100
16const RG_BIG_N: i64 = 5000
17const RG_MODE_755: i64 = 493
18const RG_MODE_644: i64 = 420

functions

20func rg_mkdir(path: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_munmap
28func rg_write_fixture(path: *u8, n: i64) -> i64
38func rg_bytes_match(buf: *u8, n: i64) -> i64
called by 1: main
44func main(argc: i64, argv: *i64) -> i64