diff --git a/include/ck_brlock.h b/include/ck_brlock.h index 0adbaeb..a64be1f 100644 --- a/include/ck_brlock.h +++ b/include/ck_brlock.h @@ -193,7 +193,7 @@ ck_brlock_read_lock(struct ck_brlock *br, struct ck_brlock_reader *reader) /* Serialize counter update with respect to writer snapshot. */ ck_pr_fence_memory(); #else - ck_pr_store_uint(&readers->n_readers, 1); + ck_pr_store_uint(&reader->n_readers, 1); /* Loads can be re-ordered before previous stores, even on TSO. */ ck_pr_fence_strict_memory();