Paul E. McKenney | 1c27b64 | 2018-01-18 19:58:55 -0800 | [diff] [blame] | 1 | C CoRR+poonceonce+Once |
| 2 | |
Paul E. McKenney | 8f32543 | 2018-02-20 15:25:04 -0800 | [diff] [blame] | 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 | *) |
| 9 | |
Akira Yokosawa | 5c587f9 | 2020-11-28 08:43:45 +0900 | [diff] [blame] | 10 | {} |
Paul E. McKenney | 1c27b64 | 2018-01-18 19:58:55 -0800 | [diff] [blame] | 11 | |
| 12 | P0(int *x) |
| 13 | { |
| 14 | WRITE_ONCE(*x, 1); |
| 15 | } |
| 16 | |
| 17 | P1(int *x) |
| 18 | { |
| 19 | int r0; |
| 20 | int r1; |
| 21 | |
| 22 | r0 = READ_ONCE(*x); |
| 23 | r1 = READ_ONCE(*x); |
| 24 | } |
| 25 | |
| 26 | exists (1:r0=1 /\ 1:r1=0) |