code wiki / _hdl_build / nx_project_ws_register.nx

nx_project_ws_register.nx

buildroot/runtime/_hdl_build/nx_project_ws_register.nx

4707 B125 linesdepth 5pulls 7 transitivereach 0 importersview sourcekind tooltopic project
docsdependenciesstructsconstsfunctions

about

nx_project_ws_register.nx -- register the PROJECT MANAGEMENT arc as a LIVE workstream in the WMS registry (the tutor-doctrine debt: the PM system's own build managed BY the PM system). Mirrors nx_pm_sclass's pms_register exactly: hold the per-prefix wlock across the ws:ids RMW AND the ws:<id> record write (no nested ws_put_locked = no self-deadlock); idempotent (ws_put_p skips unchanged, ws:ids appended once). code_link = nx_project_gate so the dispatcher can machine-verify + complete it. Beats the string-keyed heartbeat so the board shows the stream ALIVE. Verifies by READBACK. expect_exit: 0 license_tier: ORIGINAL

dependencies 2 imports · 0 importers

nx_ws_cas.nx nx_heartbeat_str.nx nx_project_ws_register.nx

imports: nx_ws_cas.nxnx_heartbeat_str.nx

imported by: nobody (leaf or entry point)

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

main pwr_puts pwr_register sys_openat_append sys_flock pwr_cat pwr_n sys_now_realtime_sec sys_mmap sys_clock_gettime_real ws_put_p sys_mmap ↻ ws_len ss_get sys_mmap ↻ ss_scan sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn ss_scan_seglist ss_len sys_mmap ↻ ss_cat ss_readall ss_r32 ss_begin ss_begin_cap sys_mmap ↻ ss_add ss_add2 ss_w32 ss_len ↻ ws_seg_next ss_next_segid sys_mmap ↻ ss_cat ↻ ss_readall ↻ ss_segid_ok ss_commit ss_segid_ok ↻

structs

none

consts

10const PWR_MAGIC_1024: i64 = 1024
12const PWR_ID: *u8 = "PROJECT-SOTA-01"
13const PWR_MEM: *u8 = "project-nishi-projectmgmt-sota-2026-07-09"
14const PWR_HB: *u8 = "knowledge/status/wms_heartbeat.log"

functions

16func pwr_puts(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
17func pwr_cat(dst: *u8, off: i64, s: *u8) -> i64 { var o: i64 = off; var i: i64 = 0; while s[i] != (0 as u8) { dst[o] = s[i]; o = o + 1; i = i + 1 } return o }
called by 1: pwr_register
18func pwr_n(dst: *u8, off: i64, v: i64) -> i64
called by 1: pwr_register
31func pwr_register(id: *u8, state: *u8, code: *u8) -> i64
96func main() -> i64