nx_sts_lock_gate.nx
buildroot/runtime/nx_sts_lock_gate.nx
about
nx_sts_lock_gate.nx -- proves sts_append_row's lock actually prevents the seq1559 lost-row race.
THE COMPARISON IS CONTROLLED: both arms run the IDENTICAL read-modify-write with the IDENTICAL
artificial window (a sleep between load and commit). The ONLY difference is whether <prefix>plock
is held across it. If the locked arm keeps every row and the unlocked arm loses some, the lock is
doing the work -- nothing else varies, so nothing else can be credited.
NON-VACUITY IS THE POINT: a concurrency test that never triggers the race proves nothing at all.
The unlocked arm MUST lose rows. If it does not, this gate reports VACUOUS rather than GREEN --
a guard that cannot be shown to fire has not been tested.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 4 imports · 0 importers
imports: nx_store_seed_lib.nxnx_seg_store.nxnx_syscalls.nxnx_gate_verdict.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
| 17 | const G_N: i64 = 6 |
| 18 | const G_CAP: i64 = 262144 |
| 19 | const G_WIDEN_MS: i64 = 150 |
| 20 | const G_NL: i64 = 10 |
| 21 | const G_PATHCAP: i64 = 256 |
functions
| 23 | func g_w(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 24 | func g_num(v: i64) -> i64 |
| 36 | func g_rows(prefix: *u8) -> i64 |
| 48 | func g_worker(prefix: *u8, id: i64, locked: i64) -> i64 |
| 67 | func g_arm(prefix: *u8, locked: i64) -> i64 |
| 85 | func main(argc: i64, argv: *i64) -> i64 |