From 7657df25a847e9d147f32dc525b66c5303c72f14 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Tue, 7 Aug 2012 12:24:15 -0400 Subject: [PATCH] ck_sequence: Serialize read_begin, add load barrier. --- include/ck_sequence.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/ck_sequence.h b/include/ck_sequence.h index 0f57802..690e1e8 100644 --- a/include/ck_sequence.h +++ b/include/ck_sequence.h @@ -41,6 +41,7 @@ typedef struct ck_sequence ck_sequence_t; CK_CC_INLINE static void ck_sequence_init(struct ck_sequence *sq) { + ck_pr_store_uint(&sq->sequence, 0); return; } @@ -68,6 +69,7 @@ ck_sequence_read_begin(struct ck_sequence *sq) ck_pr_stall(); } + ck_pr_fence_load(); return version; }