From ac8397d8b52877e244a631eb9ce3a6b3b4020831 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 2 Jan 2014 09:19:33 -0500 Subject: [PATCH] ck_rwcohort: Migrate to acquire / release. --- include/ck_rwcohort.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/include/ck_rwcohort.h b/include/ck_rwcohort.h index c4d8713..8b8d61b 100644 --- a/include/ck_rwcohort.h +++ b/include/ck_rwcohort.h @@ -125,13 +125,14 @@ if (raised == true) \ ck_pr_dec_uint(&rw_cohort->write_barrier); \ \ + ck_pr_fence_load(); \ return; \ } \ CK_CC_INLINE static void \ ck_rwcohort_wp_##N##_read_unlock(CK_RWCOHORT_WP_INSTANCE(N) *cohort) \ { \ \ - ck_pr_fence_memory(); \ + ck_pr_fence_load_atomic(); \ ck_pr_dec_uint(&cohort->read_counter); \ return; \ } @@ -232,7 +233,7 @@ ck_rwcohort_rp_##N##_read_unlock(CK_RWCOHORT_RP_INSTANCE(N) *cohort) \ { \ \ - ck_pr_fence_memory(); \ + ck_pr_fence_load_atomic(); \ ck_pr_dec_uint(&cohort->read_counter); \ return; \ } @@ -304,7 +305,7 @@ ck_rwcohort_neutral_##N##_read_unlock(CK_RWCOHORT_NEUTRAL_INSTANCE(N) *cohort) \ { \ \ - ck_pr_fence_memory(); \ + ck_pr_fence_load_atomic(); \ ck_pr_dec_uint(&cohort->read_counter); \ return; \ }