code wiki / _hdl_build / nx_deadman_gate.nx
nx_deadman_gate.nx
buildroot/runtime/_hdl_build/nx_deadman_gate.nx
about
nx_deadman_gate.nx -- REFEREE for the proof-of-life dead-man's switch. Deterministic (fixed clock):
silence=100s, veto=50s, now=2000000.
T1 just beat (silent 0) -> ALIVE
T2 silent 120 (in [100,150)) -> PENDING (alert + vetoable)
T3 silent 200 (>= 150) -> EXPIRED (succession proceeds)
T4 PENDING then a heartbeat -> ALIVE (a living user's login VETOES succession)
T5 heartbeat round-trips through the state file (write now -> read == now)
GREEN iff T1..T5. Sovereign: nx_deadman + nx_syscalls. license_tier: ORIGINAL
dependencies 2 imports · 0 importers
imports: nx_deadman.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
| 12 | func g_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 13 | func g_row(name: *u8, ok: i64) -> i64 |
| 20 | func main() -> i64 |