code wiki / _hdl_build / nx_arbiter_gate.nx
nx_arbiter_gate.nx
buildroot/runtime/_hdl_build/nx_arbiter_gate.nx
about
nx_arbiter_gate.nx -- proves the arbitration primitive (nx_arbiter): a kernel-enforced exclusive lock
serializes concurrent writers on a shared resource. Asserts: acquire succeeds; while held, a second
independent try is DENIED (mutual exclusion); after release the lock is free again; the lock file lives under
the stable shared LOCKDIR (not /tmp). Uses a PER-WORKSTREAM test resource (via NISHI_WSID) so concurrent
sibling gate runs in the 21-workstream fleet don't contend on the same test lock. GREEN iff all 5 pass. license_tier: ORIGINAL
dependencies 5 imports · 0 importers
imports: nx_syscalls.nxnx_arbiter.nxnx_runpath.nxnx_gate_verdict.nxnx_lease.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 12 | func g_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 13 | func g_starts(a: *u8, b: *u8) -> i64 { var i: i64=0; while b[i]!=(0 as u8){ if a[i]!=b[i]{return 0} i=i+1 } return 1 } called by 1: main |
| 14 | func g_row(id: *u8, ok: i64, pass: *i64) -> i64 { g_w(" "); g_w(id); g_w(": "); if ok==1 { g_w("OK\n"); pass[0]=pass[0]+1 } else { g_w("FAIL\n") } return 0 } |
| 16 | func main() -> i64 |