code wiki / _hdl_build / nx_consol_apply_mc_gate.nx
nx_consol_apply_mc_gate.nx
buildroot/runtime/_hdl_build/nx_consol_apply_mc_gate.nx
about
nx_consol_apply_mc_gate.nx -- GATE for the multi-consumer applier (5 teeth: consolidate, never-brick
refuse, restore-verify, determinism, shadow-absent). PREREQ: stage _offc/nx_consol_apply_mc.elf +
_offc/nx_mc_fix.elf. Run from nxc2 root. The mock nx_mc_fix makes each importer's artifact depend on
the shared lib /tmp/mc_shared. importers-file = /tmp/mc_imps (imp1,imp2).
T1 retire UNRELATED file -> all importers identical -> CONSOLIDATED | T2 retire the SHARED lib ->
importers change -> REFUSED | T3 after T2 the shared lib is RESTORED byte-exact | T4 determinism |
T5 absent shadow -> exit 2.
license_tier: ORIGINAL No hw writes (Rule 26).
dependencies 4 imports · 0 importers
imports: nx_seat_drive_lib.nxnx_seg_store.nxnx_deploy_lib.nxnx_syscalls.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
| 14 | func mg_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c >= 48 { if c <= 57 { v = v * 10 + (c - 48) } } i = i + 1 } return v } called by 1: main |
| 15 | func mg_itoa(dst: *u8, v: i64) -> i64 { var m: i64 = v; let t: *u8 = sys_mmap(24); var k: i64 = 0; if m == 0 { t[0] = 48 as u8; k = 1 } while m > 0 { t[k] = (48 + (m % 10)) as u8; m = m / 10; k = k + 1 } var i: i64 = 0; while i < k { dst[i] = t[k - 1 - i]; i = i + 1 } dst[k] = 0 as u8; return k } |
| 16 | func mg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 17 | func mg_exists(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd >= 0 { sys_close(fd); return 1 } return 0 } |
| 18 | func mg_read(p: *u8, b: *u8, cap: i64) -> i64 { let fd: i64 = sys_openat_rd(p); if fd < 0 { return 0 - 1 } let n: i64 = sys_read(fd, b, cap - 1); sys_close(fd); return n } |
| 20 | func mg_run(shadow: *u8, retire: *u8, outp: *u8) -> i64 |
| 29 | func mg_seed() -> i64 |
| 39 | func main(argc: i64, argv: *i64) -> i64 |