code wiki / _hdl_build / nx_autorun_daemon.nx
nx_autorun_daemon.nx
buildroot/runtime/_hdl_build/nx_autorun_daemon.nx
about
nx_autorun_daemon.nx -- THE SLOW BEAT (was: math-only; X-Q-007 made the
target list DATA): each beat re-proves every conf-listed target through
the durable lane. Kept OFF the 30-min Conductor pulse on purpose (rule
21: the pulse stays cheap and reads evidence; THIS daemon renews it).
- interval from knowledge/status/autorun_daemon.conf (I row)
- targets from the SAME conf (T <basename> rows, re-read EVERY beat so
conf edits apply without re-arm; no T rows = the historical
nx_math_rung_run default) -- policy in nx_ad_core (gate-driven)
- beat output -> autorun_daemon.out; AUTORUN-TGT row per target + ONE
AUTORUN-BEAT row (rung_rc= kept as worst-rc for old readers)
- self-daemonizes; duplicate guard via autorun_daemon.pid + /proc cmdline
Sovereign (syscalls only, no .sh). Run from nxc2 root. license_tier: ORIGINAL
(nx_syscalls arrives via nx_ad_core -- a direct second import alongside it
produced a deterministic NXASM rc=6 on this file; dedup fixed it)
dependencies 1 imports · 0 importers
imports: nx_ad_core.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
| 16 | const SYS_MAGIC_4096: i64 = 4096 |
| 17 | const SYS_MAGIC_4080: i64 = 4080 |
| 96 | const SYS_MKNODAT: i64 = 259 // x86-64 (the daemon runs on the WSL x86-64 host) |
| 97 | const S_IFIFO_0666: i64 = 4534 // S_IFIFO (0o010000=4096) | 0o666 (438) |
| 98 | const O_RDWR_FLAG: i64 = 2 // open the FIFO read+write so the daemon is always |
functions
| 18 | func _p(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 |
| 19 | func _pn(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(1,bb,k); return 0 } called by 1: main |
| 20 | func _fp(fd: i64, s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(fd,s,n); return 0 } |
| 21 | func _fn(fd: i64, v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m}; let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48;k=1}; while m>0{t[k]=48+(m%10);m=m/10;k=k+1}; var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1}; sys_write(fd,bb,k); return 0 } called by 1: main |
| 22 | func ad_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } called by 1: ad_contains |
| 23 | func ad_cat(dst: *u8, off: i64, s: *u8) -> i64 { var i: i64 = 0; while s[i] != (0 as u8) { dst[off+i] = s[i]; i = i + 1 } return off + i } |
| 24 | func ad_read_all(path: *u8, buf: *u8, cap: i64) -> i64 |
| 33 | func ad_contains(hay: *u8, n: i64, pat: *u8) -> i64 |
| 46 | func ad_sleep(secs: i64) -> i64 |
| 52 | func ad_interval() -> i64 calls 1: ad_read_all |
| 76 | func ad_already_running() -> i64 |
| 102 | func ad_fifo_path(out: *u8) -> i64 |
| 124 | func ad_open_event(path: *u8) -> i64 called by 1: main |
| 129 | func ad_beat() -> i64 |
| 134 | func main() -> i64 |