From 0c205740aafa3e1f1d5af7ddff6ba6e0ba0cf571 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 2 Jan 2014 09:14:30 -0500 Subject: [PATCH] ck_pflock: Migrate to acquire / release. --- include/ck_pflock.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ck_pflock.h b/include/ck_pflock.h index 49a47ac..83663b4 100644 --- a/include/ck_pflock.h +++ b/include/ck_pflock.h @@ -70,7 +70,7 @@ CK_CC_INLINE static void ck_pflock_write_unlock(ck_pflock_t *pf) { - ck_pr_fence_memory(); + ck_pr_fence_release(); /* Migrate from write phase to read phase. */ ck_pr_and_32(&pf->rin, CK_PFLOCK_LSB); @@ -102,7 +102,7 @@ ck_pflock_write_lock(ck_pflock_t *pf) while (ck_pr_load_32(&pf->rout) != ticket) ck_pr_stall(); - ck_pr_fence_memory(); + ck_pr_fence_acquire(); return; } @@ -133,7 +133,7 @@ ck_pflock_read_lock(ck_pflock_t *pf) ck_pr_stall(); leave: - /* Acquire semantics. */ + /* Acquire semantics with respect to readers. */ ck_pr_fence_load(); return; }