tools/memory-model: Add types to litmus tests
[linux-2.6-microblaze.git] / tools / memory-model / litmus-tests / LB+poonceonces.litmus
1 C LB+poonceonces
2
3 (*
4  * Result: Sometimes
5  *
6  * Can the counter-intuitive outcome for the load-buffering pattern
7  * be prevented even with no explicit ordering?
8  *)
9
10 {
11         int x;
12         int y;
13 }
14
15 P0(int *x, int *y)
16 {
17         int r0;
18
19         r0 = READ_ONCE(*x);
20         WRITE_ONCE(*y, 1);
21 }
22
23 P1(int *x, int *y)
24 {
25         int r0;
26
27         r0 = READ_ONCE(*y);
28         WRITE_ONCE(*x, 1);
29 }
30
31 exists (0:r0=1 /\ 1:r0=1)