code wiki / _hdl_build / nx_work_dispatcher.nx
nx_work_dispatcher.nx
buildroot/runtime/_hdl_build/nx_work_dispatcher.nx
about
nx_work_dispatcher.nx -- the team picks items off the backlog and works them like a real team: respects
the governor's worker budget, tracks status, and ESCALATES blockers ("reaches out for help") instead of
spinning (operator: "acts like a real team picking up items from the backlogs and working them and
reaching out for help when they encounter blockers"). Supports a manual OVERRIDE pick (crash-the-gates).
Pure policy. license_tier: ORIGINAL Driven by nx_resource_governor + nx_sysload; priorities from the
PM decision matrix.
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_assignments_run.nxnx_team_console.nx
structs
| none |
consts
| 10 | const WD_QUEUED: i64 = 0 |
| 11 | const WD_RUNNING: i64 = 1 |
| 12 | const WD_BLOCKED: i64 = 2 |
| 13 | const WD_DONE: i64 = 3 |
| 14 | const WD_HELP: i64 = 4 // escalated -- reached out for help |
functions
| 17 | func wd_start_count(worker_budget: i64, running: i64, queued: i64) -> i64 called by 1: main |
| 25 | func wd_pick(states: *i64, prio: *i64, n: i64, override_idx: i64) -> i64 called by 1: main |
| 33 | func wd_should_escalate(state: i64) -> i64 { if state == WD_BLOCKED { return 1 } return 0 } called by 1: main |
| 35 | func wd_count(states: *i64, n: i64, s: i64) -> i64 called by 1: main |
| 41 | func wd_state_label(s: i64) -> *u8 called by 1: main |