nx_ppdemo_threads.nx
buildroot/runtime/nx_ppdemo_threads.nx
about
nx_ppdemo_threads.nx -- REAL multi-core proof via raw __thread_clone (stage-1 func-pointers). Spawns 4 worker
threads, each doing a heavy data-dependent LCG loop (not DCE-able); main does the same. 5 compute streams
sharing ONE process (CLONE_VM) -> if they run in parallel, nx_parallelism_probe reads cpu/wall ~5 (vs the
serial demo's 1.00). This is the codec unlock made measurable. Build with the func-ptr compiler.
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| 6 | const K_MAGIC_1103515245: i64 = 1103515245 |
| 7 | const K_MAGIC_12345: i64 = 12345 |
| 8 | const K_MAGIC_2147483647: i64 = 2147483647 |
| 9 | const K_MAGIC_262144: i64 = 262144 |
| 10 | const K_MAGIC_5000000000: i64 = 5000000000 |
| 12 | const NTHREAD: i64 = 4 |
| 13 | const ITERS: i64 = 1500000000 |
functions
| 15 | func hot(ctx: *u8) -> i64 |
| 25 | func main() -> i64 |