From 88d323f40d97568bfb754313e8b3dd2778af72bd Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 17 Apr 2014 16:17:07 -0400 Subject: [PATCH] Revert "ck_rwlock: Acquire semantics for ordering on latch bits." This reverts commit 2b567320de8c1b67c386a8b42165ca124a7bcca8. --- include/ck_rwlock.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/ck_rwlock.h b/include/ck_rwlock.h index 25cb1be..e89db6f 100644 --- a/include/ck_rwlock.h +++ b/include/ck_rwlock.h @@ -223,7 +223,6 @@ ck_rwlock_read_lock(ck_rwlock_t *rw) * fence operation. If writer is observed to 0, then * it is guaranteed that the latch will be visible. */ - ck_pr_fence_load(); snapshot = ck_pr_load_32(&rw->n_readers); if (snapshot >> CK_RWLOCK_LATCH_SHIFT) continue; @@ -234,6 +233,8 @@ ck_rwlock_read_lock(ck_rwlock_t *rw) ck_pr_dec_32(&rw->n_readers); } + /* Acquire semantics are necessary. */ + ck_pr_fence_load(); return; }