ck_epoch: Update reader-side.

ck_pring
Samy Al Bahra 14 years ago
parent 70860736f6
commit 13dd1a4f82

@ -243,8 +243,9 @@ ck_epoch_write_begin(struct ck_epoch_record *record)
CK_CC_INLINE static void
ck_epoch_read_begin(struct ck_epoch_record *record)
{
unsigned int g_epoch = ck_pr_load_uint(&global->epoch) & (CK_EPOCH_LENGTH - 1);
unsigned int g_epoch = ck_pr_load_uint(&record->global->epoch);
g_epoch &= CK_EPOCH_LENGTH - 1;
ck_pr_store_uint(&record->epoch, g_epoch);
ck_pr_store_uint(&record->active, 1);
ck_pr_fence_store();

Loading…
Cancel
Save