spinlock/dec: backoff until lock state transition in lock_eb.

This fixes an issue caught by Changwoo Min (@multics69).
ck_pring
Samy Al Bahra 8 years ago
parent 33e5698b01
commit 8343bd4af8

@ -111,7 +111,8 @@ ck_spinlock_dec_lock_eb(struct ck_spinlock_dec *lock)
if (r == true) if (r == true)
break; break;
ck_backoff_eb(&backoff); while (ck_pr_load_uint(&lock->value) != 1)
ck_backoff_eb(&backoff);
} }
ck_pr_fence_lock(); ck_pr_fence_lock();

Loading…
Cancel
Save