Skip to content

Commit

Permalink
Merge pull request concurrencykit#41 from cota/for_samy2
Browse files Browse the repository at this point in the history
ck_sequence: relax sequence increment from atomic to regular store
  • Loading branch information
sbahra committed Jul 9, 2015
2 parents 3971541 + 3f48bc3 commit 5f7cfaa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/ck_sequence.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ ck_sequence_write_begin(struct ck_sequence *sq)
* Increment the sequence to an odd number to indicate
* the beginning of a write update.
*/
ck_pr_inc_uint(&sq->sequence);
ck_pr_store_uint(&sq->sequence, sq->sequence + 1);
ck_pr_fence_store();
return;
}
Expand All @@ -118,7 +118,7 @@ ck_sequence_write_end(struct ck_sequence *sq)
* completion of a write update.
*/
ck_pr_fence_store();
ck_pr_inc_uint(&sq->sequence);
ck_pr_store_uint(&sq->sequence, sq->sequence + 1);
return;
}

Expand Down

0 comments on commit 5f7cfaa

Please sign in to comment.