From 4fc17179755eccb5316728c03ae26160e6a64a9a Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Mon, 12 Mar 2012 12:50:17 -0400 Subject: [PATCH] ck_epoch: Use full barrier on read begin and load barrier on read end. We shouldn't offload the responsibility of the read_begin flush for shared data mutations to the user. read_end requires a load barrier at the least, not a store barrier. --- include/ck_epoch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ck_epoch.h b/include/ck_epoch.h index 23215dd..65b0b00 100644 --- a/include/ck_epoch.h +++ b/include/ck_epoch.h @@ -98,7 +98,7 @@ ck_epoch_read_begin(ck_epoch_record_t *record) } ck_pr_store_uint(&record->active, record->active + 1); - ck_pr_fence_store(); + ck_pr_fence_memory(); return; } @@ -106,7 +106,7 @@ CK_CC_INLINE static void ck_epoch_read_end(ck_epoch_record_t *record) { - ck_pr_fence_store(); + ck_pr_fence_load(); ck_pr_store_uint(&record->active, record->active - 1); return; }