code wiki / _hdl_build / nx_adopt.nx
nx_adopt.nx
buildroot/runtime/_hdl_build/nx_adopt.nx
about
nx_adopt.nx -- THE ADOPTION CENSUS. Which capability primitives has nobody adopted? (operator priority)
LAW: THE BOTTLENECK IS NOT BUILDING PRIMITIVES, IT IS ADOPTING THEM. Three proofs on 2026-07-30:
cpu-feature-detect existed with a KAT, registered nowhere (seq1359) - ss_close: 133 openers, 1 closer
(seq1347) - nx_hw_cpu_count: CORRECT (sched_getaffinity, cgroup-safe) with ZERO external callers in
19,823 files while nx_torrent_get hardcodes MAXP=32 (seq1410). A build-only 'done' is the cause.
==> A ZERO-CALLER CAPABILITY PRIMITIVE IS A RED DEFECT, NOT A COMPLETED FEATURE.
SCALE: the naive census greps the corpus once per primitive = O(primitives x corpus). This walks the
corpus TWICE total -- pass A hashes every definition, pass B counts every identifier against it with
O(1) lookups -- so cost is O(corpus) regardless of how many primitives exist.
SELF-REFERENCES DO NOT COUNT AS ADOPTION. nx_hw_cpu_count showed FIVE grep matches and looked alive;
four were its own file. Definition-file hits are tallied SEPARATELY from external ones -- that is the
entire difference between 'used' and 'looks used'.
argv: <defs-dir> [callers-dir]
exit 0 = ran, 2 = usage/unreadable. license_tier: ORIGINAL Read-only. No hw writes (Rule 26).
dependencies 3 imports · 0 importers
imports: nx_adopt_lib.nxnx_proc_ctl.nxnx_resmon_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
| 22 | const AD_CAP: i64 = 65536 |
| 23 | const AD_TBL_BYTES: i64 = 524288 |
| 24 | const AD_NAMEBUF: i64 = 2097152 |
| 25 | const AD_FILECAP: i64 = 2097152 |
| 26 | const AD_DIRBUF: i64 = 262144 |
| 27 | const AD_MAXREPORT: i64 = 30 |
| 28 | const AD_PATHBUF: i64 = 1024 |
| 29 | const AD_PAREN: i64 = 40 |
| 30 | const AD_SLASH: i64 = 47 |
| 31 | const AD_NL: i64 = 10 |
| 32 | const AD_SP: i64 = 32 |
| 33 | const AD_F: i64 = 102 |
| 34 | const AD_U: i64 = 117 |
| 35 | const AD_N: i64 = 110 |
| 36 | const AD_C: i64 = 99 |
| 39 | const AD_SAVEFD: i64 = 9 |
| 41 | const AD_STAMPFD: i64 = 10 |
| 46 | const AD_STAMP: *u8 = "knowledge/status/adopt_census.stamp" as *u8 |
functions
| 56 | func ad_has_sub(nm: *u8, sub: *u8) -> i64 called by 1: ad_is_prooffile |
| 74 | func ad_is_prooffile(nm: *u8) -> i64 |
| 82 | func main(argc: i64, argv: *i64) -> i64 |