code wiki / (root) / nx_atomic_intrinsic_test.nx

nx_atomic_intrinsic_test.nx

buildroot/runtime/nx_atomic_intrinsic_test.nx

3916 B114 linesdepth 6pulls 8 transitivereach 0 importersview sourcekind gate/prooftopic atomic
docsdependenciesstructsconstsfunctions

about

nx_atomic_intrinsic_test.nx -- exercise the __atomic_* compiler builtins. Single-threaded smoke; SMP semantics get exercised by nx_thread_pool integration tests once threads ship. Each test isolates one builtin so a failure points at the exact codegen path: load / store / cas / faa / fence.

dependencies 2 imports · 0 importers

nx_kernel_v2.nx nx_log.nx nx_atomic_intrinsic_test.nx

imports: nx_kernel_v2.nxnx_log.nx

imported by: nobody (leaf or entry point)

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

main t1_load_store_round_trip t2_cas_success t3_cas_failure_leaves_cell t4_faa_returns_prior t5_fence_compiles_and_runs t6_spinlock_via_cas

structs

none

consts

11const NX_MO_RELAXED: i64 = 0
12const NX_MO_ACQUIRE: i64 = 2
13const NX_MO_RELEASE: i64 = 3
14const NX_MO_ACQ_REL: i64 = 4
15const NX_MO_SEQ_CST: i64 = 5

functions

17func t1_load_store_round_trip() -> i64
called by 1: main
27func t2_cas_success() -> i64
called by 1: main
37func t3_cas_failure_leaves_cell() -> i64
called by 1: main
47func t4_faa_returns_prior() -> i64
called by 1: main
60func t5_fence_compiles_and_runs() -> i64
called by 1: main
69func t6_spinlock_via_cas() -> i64
called by 1: main
83func main() -> nx_exit