| C MP+polockmbonce+poacquiresilsil |
| * Do spinlocks combined with smp_mb__after_spinlock() provide order |
| * to outside observers using spin_is_locked() to sense the lock-held |
| * state, ordered by acquire? Note that when the first spin_is_locked() |
| * returns false and the second true, we know that the smp_load_acquire() |
| * executed before the lock was acquired (loosely speaking). |
| P0(spinlock_t *lo, int *x) // Producer |
| smp_mb__after_spinlock(); |
| P1(spinlock_t *lo, int *x) // Consumer |
| r1 = smp_load_acquire(x); |
| exists (1:r1=1 /\ 1:r2=0 /\ 1:r3=1) (* Bad outcome. *) |