1 C MP+polockonce+poacquiresilsil
6 * Do spinlocks provide order to outside observers using spin_is_locked()
7 * to sense the lock-held state, ordered by acquire? Note that when the
8 * first spin_is_locked() returns false and the second true, we know that
9 * the smp_load_acquire() executed before the lock was acquired (loosely
16 P0(spinlock_t *lo, int *x)
23 P1(spinlock_t *lo, int *x)
29 r1 = smp_load_acquire(x);
30 r2 = spin_is_locked(lo);
31 r3 = spin_is_locked(lo);
34 exists (1:r1=1 /\ 1:r2=0 /\ 1:r3=1)