ck_spinlock: Adopt RMO for anderson spinlock.

ck_pring
Samy Al Bahra 12 years ago
parent ce4cdd45c8
commit a7c4b9df65

@ -133,6 +133,9 @@ ck_spinlock_anderson_lock(struct ck_spinlock_anderson *lock,
position &= lock->mask;
}
/* Serialize with respect to previous thread's store. */
ck_pr_fence_load();
/* Spin until slot is marked as unlocked. First slot is initialized to false. */
while (ck_pr_load_uint(&lock->slots[position].locked) == true)
ck_pr_stall();
@ -142,7 +145,6 @@ ck_spinlock_anderson_lock(struct ck_spinlock_anderson *lock,
ck_pr_fence_store();
*slot = lock->slots + position;
return;
}

Loading…
Cancel
Save