brintos

brintos / linux-shallow public Read only

0
0
Text · 324 B · 4635739 Raw
26 lines · plain
1C CoRW+poonceonce+Once2 3(*4 * Result: Never5 *6 * Test of read-write coherence, that is, whether or not a read from7 * a given variable and a later write to that same variable are ordered.8 *)9 10{}11 12P0(int *x)13{14	int r0;15 16	r0 = READ_ONCE(*x);17	WRITE_ONCE(*x, 1);18}19 20P1(int *x)21{22	WRITE_ONCE(*x, 2);23}24 25exists (x=2 /\ 0:r0=2)26