From d3a7adaf8c6b3c6a4523f18b9d75f0879500791b Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 17 Apr 2014 16:16:36 -0400 Subject: [PATCH] Revert "ck_rwlock: Additional reorganization." This reverts commit 56de32fffde906357ed0bb5e42555c84b522a08a. --- include/ck_rwlock.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/ck_rwlock.h b/include/ck_rwlock.h index 73a1bd7..03440e8 100644 --- a/include/ck_rwlock.h +++ b/include/ck_rwlock.h @@ -71,15 +71,6 @@ ck_rwlock_write_lock(ck_rwlock_t *rw) return; } -CK_CC_INLINE static void -ck_rwlock_write_unlock(ck_rwlock_t *rw) -{ - - ck_pr_fence_release(); - ck_pr_store_32(&rw->writer, 0); - return; -} - CK_CC_INLINE static bool ck_rwlock_write_trylock(ck_rwlock_t *rw) { @@ -97,6 +88,15 @@ ck_rwlock_write_trylock(ck_rwlock_t *rw) return true; } +CK_CC_INLINE static void +ck_rwlock_write_unlock(ck_rwlock_t *rw) +{ + + ck_pr_fence_release(); + ck_pr_store_32(&rw->writer, 0); + return; +} + CK_CC_INLINE static bool ck_rwlock_locked_writer(ck_rwlock_t *rw) {