code wiki / _hdl_build / nx_deadline_gate.nx
nx_deadline_gate.nx
buildroot/runtime/_hdl_build/nx_deadline_gate.nx
about
nx_deadline_gate.nx -- the referee for request-deadline propagation (nx_deadline_lib).
The property that matters is not "does it parse a number". It is that the clamp can only ever SHORTEN a
wait the caller already chose, because that is what makes this a COMPOSITION of the estate's existing
per-lane timeout rulers instead of a second, rival one. So the load-bearing tooth is exhaustive over a
grid: for every (deadline, now, want) tried, dl_wait_ms <= want AND >= 0. A primitive that could return
more than `want` would silently extend somebody's timeout the first time it was adopted.
It also asserts the PRODUCER and CONSUMER agree on the header name by reading the producer's SOURCE --
nx_sites_daemon_v2 carries its own NX_SD2_DEADLINE_HDR copy today, and a comment asking people to keep
two literals in step is not a control. This tooth turns that into a RED.
license_tier: ORIGINAL Read-only. No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_deadline_lib.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
| 17 | const DG_SRC_A: *u8 = "buildroot/runtime/_hdl_build/nx_sites_daemon_v2.nx" |
| 18 | const DG_SRC_B: *u8 = "runtime/_hdl_build/nx_sites_daemon_v2.nx" |
| 19 | const DG_SRC_C: *u8 = "/mnt/c/Users/elder/nishi-core/nxc2/runtime/_hdl_build/nx_sites_daemon_v2.nx" |
| 20 | const DG_PROD_CONST: *u8 = "const NX_SD2_DEADLINE_HDR: *u8 = \"" |
| 23 | const DG_FX_BUF: i64 = 2048 |
| 28 | const DG_FX_DEADLINE_MS: i64 = 1234567 |
| 33 | const DG_FX_HDR_OFF: i64 = 31 |
| 34 | const DG_FX_TRUNC_LEN: i64 = 6 |
functions
| 36 | func dg_len(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n } |
| 38 | func dg_find(hay: *u8, hn: i64, needle: *u8) -> i64 |
| 58 | func dg_put(dst: *u8, off: i64, s: *u8) -> i64 called by 1: main |
| 63 | func dg_read_any(box: *i64) -> *u8 |
| 70 | func main(argc: i64, argv: *i64) -> i64 |