nx_writejob_sweep.nx
buildroot/runtime/nx_writejob_sweep.nx
about
nx_writejob_sweep.nx -- drain the writer's durable job queue (operator 2026-08-05: the hub
stores requests and runs them later; nothing pushed from a spoke may take the hub down).
Walks knowledge/staging/writejobs.queue (append-only ledger of job ids), and for each id that
has a .req ticket but no finished .txt: re-runs ./nx_write.elf with the stored mode+prompt.
ADMISSION COMPOSES FOR FREE: nx_write itself yields (NX-WRITE-DEFERRED) while a game holds the
GPU, so a sweep during play leaves everything queued and costs one probe. Batch per sweep is
conf-driven (writejob_sweep_batch). A consumed ticket is renamed .req.done (never deleted).
license_tier: ORIGINAL module: nishi-core.write.sweep
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_lane_conf.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
| 12 | const SW_BUF: i64 = 262144 |
| 13 | const SW_CAP: i64 = 200000 |
| 14 | const SW_LINE: i64 = 4096 |
functions
| 16 | func sw_len(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } called by 1: sw_w |
| 17 | func sw_w(s: *u8) -> i64 { sys_write(1, s, sw_len(s)); return 0 } |
| 18 | func sw_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){d[o+i]=s[i];i=i+1} return o+i } called by 1: main |
| 19 | func sw_u(dst: *u8, off: i64, v: i64) -> i64 |
| 27 | func sw_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 37 | func sw_writeall(fd: i64, buf: *u8, n: i64) -> i64 |
| 44 | func sw_fork(mode: *u8, prompt: *u8, ob: *u8, cap: i64) -> i64 |
| 77 | func main(argc: i64, argv: *i64) -> i64 |