xref: /linux/tools/memory-model/litmus-tests/ISA2+poonceonces.litmus (revision 1c27b644c0fdbc61e113b8faee14baeb8df32486)
1*1c27b644SPaul E. McKenneyC ISA2+poonceonces
2*1c27b644SPaul E. McKenney
3*1c27b644SPaul E. McKenney{}
4*1c27b644SPaul E. McKenney
5*1c27b644SPaul E. McKenneyP0(int *x, int *y)
6*1c27b644SPaul E. McKenney{
7*1c27b644SPaul E. McKenney	WRITE_ONCE(*x, 1);
8*1c27b644SPaul E. McKenney	WRITE_ONCE(*y, 1);
9*1c27b644SPaul E. McKenney}
10*1c27b644SPaul E. McKenney
11*1c27b644SPaul E. McKenneyP1(int *y, int *z)
12*1c27b644SPaul E. McKenney{
13*1c27b644SPaul E. McKenney	int r0;
14*1c27b644SPaul E. McKenney
15*1c27b644SPaul E. McKenney	r0 = READ_ONCE(*y);
16*1c27b644SPaul E. McKenney	WRITE_ONCE(*z, 1);
17*1c27b644SPaul E. McKenney}
18*1c27b644SPaul E. McKenney
19*1c27b644SPaul E. McKenneyP2(int *x, int *z)
20*1c27b644SPaul E. McKenney{
21*1c27b644SPaul E. McKenney	int r0;
22*1c27b644SPaul E. McKenney	int r1;
23*1c27b644SPaul E. McKenney
24*1c27b644SPaul E. McKenney	r0 = READ_ONCE(*z);
25*1c27b644SPaul E. McKenney	r1 = READ_ONCE(*x);
26*1c27b644SPaul E. McKenney}
27*1c27b644SPaul E. McKenney
28*1c27b644SPaul E. McKenneyexists (1:r0=1 /\ 2:r0=1 /\ 2:r1=0)
29