code wiki / (root) / nx_natfu_probe.nx

nx_natfu_probe.nx

buildroot/runtime/nx_natfu_probe.nx

1495 B41 linesdepth 7pulls 9 transitivereach 0 importersview sourcekind probe
docsdependenciesstructsconstsfunctions

about

nx_natfu_probe.nx -- NATIVE futex-roundtrip probe for the 11-import HAL. Spawns one thread via sys_thread_create (CreateThread); worker spins ~50M then stores flag=1 + sys_futex_wake (WakeByAddressAll); main futex_waits (WaitOnAddress) until the flag flips, prints FUTEXOK. Race-safe both orders: WaitOnAddress returns immediately when *addr != compare. If the 11-import layout broke the wait/wake IAT binding, this HANGS -- reproducing the LLM-gate deadlock in a 1-second probe. license_tier: ORIGINAL expect_exit: 0

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_atom.nx nx_thread.nx nx_thread_pool.nx nx_natfu_probe.nx

imports: nx_syscalls.nxnx_tier.nxnx_atom.nxnx_thread.nxnx_thread_pool.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main sys_mmap sys_thread_create nx_thread_spawn sys_mmap ↻ sys_write sys_exit nx_atom_load_i64 sys_futex_wait

structs

none

consts

14const K_MAGIC_50000000: i64 = 50000000

functions

16func fu_worker(arg: *u8) -> i64
25func main() -> i64