xref: /linux/tools/memory-model/litmus-tests/R+poonceonces.litmus (revision 1c27b644c0fdbc61e113b8faee14baeb8df32486)
1*1c27b644SPaul E. McKenneyC R+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 *x, int *y)
12*1c27b644SPaul E. McKenney{
13*1c27b644SPaul E. McKenney	int r0;
14*1c27b644SPaul E. McKenney
15*1c27b644SPaul E. McKenney	WRITE_ONCE(*y, 2);
16*1c27b644SPaul E. McKenney	r0 = READ_ONCE(*x);
17*1c27b644SPaul E. McKenney}
18*1c27b644SPaul E. McKenney
19*1c27b644SPaul E. McKenneyexists (y=2 /\ 1:r0=0)
20