code wiki / (root) / nx_gpu_sync_gate.nx

nx_gpu_sync_gate.nx

buildroot/runtime/nx_gpu_sync_gate.nx

4805 B81 linesdepth 4pulls 5 transitivereach 0 importersview sourcekind gate/prooftopic gpu
docsdependenciesstructsconstsfunctions

about

nx_gpu_sync_gate.nx -- the sovereign GPU fence (nx_gpu_sync gpu_sync_fence) on the real device, driven directly. gpu GP7, the FENCE half: a monitored fence created on the discrete 5080 through raw /dev/dxg, signalled from the CPU and waited on synchronously -- the round trip completes only when the signals advanced the real fence. Teeth: the device resolves; the fence round-trips; an invalid sync-object type is REFUSED (the create is type-sensitive, not a blind success); three tampers are rejected (a bogus handle, a zero object count, a non-dxg fd); and a POSITIVE CONTROL after the tampers still round-trips, so this is not a guard that refuses everything. THE THIRD STATE: the subject is a physical device most hosts lack (the NAS that builds this has no /dev/dxg). Absent hardware is a gv_need precondition -> SKIP, never RED; a RED from this gate means the fence path broke. The BARRIER half of GP7 is not claimed here (see nx_gpu_sync.nx); the board carries that scope. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0 (or 3 = SKIP where there is no /dev/dxg)

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_dxg.nx nx_gpu_sync.nx nx_gate_verdict.nx nx_gpu_sync_gate.nx

imports: nx_syscalls.nxnx_dxg.nxnx_gpu_sync.nxnx_gate_verdict.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 ↻ dxg_open sys_openat_rd gv_need gv_puts ↻ gv_verdict gv_note_bare_rate gv_bare_rate gv_at gv_obj_has_n gv_at ↻ gv_puts ↻ gv_num sys_mmap ↻ sys_write ↻ sys_munmap gv_puts ↻ gv_num ↻ gv_journal sys_openat_append sys_mmap ↻

structs

none

consts

17const GG_BAD_TYPE: i64 = 99
18const GG_BOGUS_SO: i64 = 0xdeadbeef

functions

20func main() -> i64