code wiki / _hdl_build / nx_synced_push.nx

nx_synced_push.nx

buildroot/runtime/_hdl_build/nx_synced_push.nx

2969 B53 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind tool
docsdependenciesstructsconstsfunctions

about

nx_synced_push.nx -- S-CLASS LIVE-SYNC: the ARBITER-WRAPPED NAS pusher. Every push to the ONE shared NAS doc-root goes through a single kernel-enforced "nas_push" lease (nx_arbiter), so concurrent sibling workstreams SERIALIZE on the vault->ssh chain instead of racing it -- the direct fix for the intermittent "live-sync bullshit" (two siblings pushing at once corrupted each other's secret/staging). Thin composition of two PROVEN pieces: nx_arbiter (the lease, race-gate-proven 380->0 lost updates) + the EXACT fork/exec idiom nx_aw_push itself uses to spawn its vault children (p_run). Same argv contract as nx_aw_push: argv[1] = src-spec file (one line: the local payload path) argv[2] = dst-cmd file (the remote write cmd) CWD must be nxc2 (nx_aw_push forks _offc/*.elf by RELATIVE path). license_tier: ORIGINAL

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_itoa_lib.nx nx_arbiter.nx nx_synced_push.nx

imports: nx_syscalls.nxnx_itoa_lib.nxnx_arbiter.nx

imported by: nobody (leaf or entry point)

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

main sp_w sys_write sys_exit sp_push fl_acquire fl_try fl_mkdir sys_mmap fl_path sys_openat_wr sys_flock sys_close fl_nap sys_mmap ↻ sys_fork sys_mmap ↻ sys_execve sys_exit ↻ sys_wait4 fl_release sys_flock ↻ sys_close ↻ sp_n nxi_out nxi_fd sys_mmap ↻ ccz_cat_num sys_write ↻ sys_munmap

structs

none

consts

13const SP_PUSH_ELF: *u8 = "_offc/nx_aw_push.elf"
14const SP_RESOURCE: *u8 = "nas_push"

functions

19func sp_push(src_spec: *u8, dst_cmd: *u8) -> i64
40func sp_w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
45func sp_n(v: i64) -> i64 { nxi_out(v); return 0 }
called by 1: main calls 1: nxi_out
47func main(argc: i64, argv: *i64) -> i64