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.
ck_pring
Samy Al Bahra 13 years ago
parent ab6cbec48b
commit 4fc1717975

@ -98,7 +98,7 @@ ck_epoch_read_begin(ck_epoch_record_t *record)
} }
ck_pr_store_uint(&record->active, record->active + 1); ck_pr_store_uint(&record->active, record->active + 1);
ck_pr_fence_store(); ck_pr_fence_memory();
return; return;
} }
@ -106,7 +106,7 @@ CK_CC_INLINE static void
ck_epoch_read_end(ck_epoch_record_t *record) 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); ck_pr_store_uint(&record->active, record->active - 1);
return; return;
} }

Loading…
Cancel
Save