blob: e69b9e3e9436dbfb39557661899033e0c61bee87 [file] [log] [blame]
Paul E. McKenney1c27b642018-01-18 19:58:55 -08001C R+mbonceonces
2
3{}
4
5P0(int *x, int *y)
6{
7 WRITE_ONCE(*x, 1);
8 smp_mb();
9 WRITE_ONCE(*y, 1);
10}
11
12P1(int *x, int *y)
13{
14 int r0;
15
16 WRITE_ONCE(*y, 2);
17 smp_mb();
18 r0 = READ_ONCE(*x);
19}
20
21exists (y=2 /\ 1:r0=0)