Skip to content

Commit

Permalink
ck_sequence: Serialize read_begin, add load barrier.
Browse files Browse the repository at this point in the history
  • Loading branch information
sbahra committed Aug 7, 2012
1 parent d100c8b commit 7657df2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/ck_sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -68,6 +69,7 @@ ck_sequence_read_begin(struct ck_sequence *sq)
ck_pr_stall();
}

ck_pr_fence_load();
return version;
}

Expand Down

0 comments on commit 7657df2

Please sign in to comment.