Fil-C on Nix

Filnix wiki

mbrock/filnix/nanofil

cas

nanofil

In Fil-C an atomic pointer lives in an atomic box (InvisiCaps)

Compare-and-exchange, the one atomic read-modify-write term in the IR: casT reads the T at an address and, if it equals Expected, writes New there, as one sequentially consistent step. Every other atomic operation is a loop of it (c_lower:rmw//7).

Its checked form raw_casT, Off always keeps its own check, and every cas ends every live fact. For p it compares addresses only, so a New may replace a pointer of another capability, as Fil-C's filc_strong_cas_ptr does. Atomics are outside the core subset: the Rocq model has no cas.