code wiki / (root) / nx_pteam_gate.nx

nx_pteam_gate.nx

buildroot/runtime/nx_pteam_gate.nx

2256 B67 linesdepth 8pulls 11 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_pteam_gate.nx -- correctness + stress gate for the persistent barrier team. Parallel band-sum of an array vs the serial sum, repeated 1000x to shake out races / lost-wakeups / hangs. Also a self-test-shaped exit. expect_exit: 0 (77 = wrong sum, hang = the run's 2e9 guard returns -1 -> 78)

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_pteam.nx nx_fmt.nx nx_pteam_gate.nx

imports: nx_syscalls.nxnx_tier.nxnx_pteam.nxnx_fmt.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap nx_pteam_new nx_hw_worker_count nx_hw_cpu_count sys_mmap ↻ sys_munmap sys_mmap ↻ sys_thread_create nx_thread_spawn sys_mmap ↻ fmt_puts fmt_puts_fd sys_write fmt_putn fmt_putn_fd sys_write ↻ nx_pteam_run nx_atom_faa_i64 _pt_wake sys_futex_wake _pt_all_done nx_atom_load_i64 nx_atom_store_i64 nx_atom_load_i64 ↻ _pt_wait sys_futex_wait nx_pteam_shutdown nx_atom_store_i64 ↻ nx_atom_faa_i64 ↻ _pt_wake ↻ nx_atom_load_i64 ↻ nx_thread_yield

structs

10struct PtCtx { arr: i64, n: i64, res: i64, cpb: i64 }

consts

none

functions

12func pg_sum_band(band: i64, ctx: i64) -> i64
29func main() -> i64