From 56de32fffde906357ed0bb5e42555c84b522a08a Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 17 Apr 2014 15:21:10 -0400 Subject: [PATCH] ck_rwlock: Additional reorganization. --- 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 1bee588..0fc2013 100644 --- a/include/ck_rwlock.h +++ b/include/ck_rwlock.h @@ -71,6 +71,15 @@ 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) { @@ -88,15 +97,6 @@ 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) {