From 9ebd19a124607fffe027d41f100d55ea736e2428 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 17 Apr 2014 16:17:02 -0400 Subject: [PATCH] Revert "ck_rwlock: Add ck_rwlock_read_latchlock operation." This reverts commit bc7ebc62eb69f3418cf51573fb13dea85369f5a3. --- include/ck_rwlock.h | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/include/ck_rwlock.h b/include/ck_rwlock.h index f987e94..25cb1be 100644 --- a/include/ck_rwlock.h +++ b/include/ck_rwlock.h @@ -190,33 +190,6 @@ CK_ELIDE_TRYLOCK_PROTOTYPE(ck_rwlock_read, ck_rwlock_t, CK_CC_INLINE static void ck_rwlock_read_lock(ck_rwlock_t *rw) -{ - - for (;;) { - while (ck_pr_load_32(&rw->writer) != 0) - ck_pr_stall(); - - ck_pr_inc_32(&rw->n_readers); - - /* - * Serialize with respect to concurrent write - * lock operation. - */ - ck_pr_fence_atomic_load(); - - if (ck_pr_load_32(&rw->writer) == 0) - break; - - ck_pr_dec_32(&rw->n_readers); - } - - /* Acquire semantics are necessary. */ - ck_pr_fence_load(); - return; -} - -CK_CC_INLINE static void -ck_rwlock_read_latchlock(ck_rwlock_t *rw) { uint32_t snapshot;