From f314b52035b55690bda2f1b4e3a574efce34deeb Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 2 Jan 2014 08:57:33 -0500 Subject: [PATCH] ck_brlock: Migrate to acquire/release. --- include/ck_brlock.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/ck_brlock.h b/include/ck_brlock.h index 6a3df36..dcb760e 100644 --- a/include/ck_brlock.h +++ b/include/ck_brlock.h @@ -91,7 +91,7 @@ ck_brlock_write_lock(struct ck_brlock *br) ck_pr_stall(); } - /* This branch should never be reached. */ + /* Already acquired with respect to other writers. */ return; } @@ -99,7 +99,7 @@ CK_CC_INLINE static void ck_brlock_write_unlock(struct ck_brlock *br) { - ck_pr_fence_memory(); + ck_pr_fence_release(); ck_pr_store_uint(&br->writer, false); return; } @@ -134,6 +134,7 @@ ck_brlock_write_trylock(struct ck_brlock *br, unsigned int factor) } } + /* Already acquired with respect to other writers. */ return true; }