Merge tag 'for-5.8/dm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[linux/fpc-iii.git] / tools / memory-model / litmus-tests / CoRR+poonceonce+Once.litmus
blob967f9f2a6226ba62ed593e6aff9e99d1fae02c85
1 C CoRR+poonceonce+Once
3 (*
4  * Result: Never
5  *
6  * Test of read-read coherence, that is, whether or not two successive
7  * reads from the same variable are ordered.
8  *)
12 P0(int *x)
14         WRITE_ONCE(*x, 1);
17 P1(int *x)
19         int r0;
20         int r1;
22         r0 = READ_ONCE(*x);
23         r1 = READ_ONCE(*x);
26 exists (1:r0=1 /\ 1:r1=0)