diff --git a/include/ck_rwlock.h b/include/ck_rwlock.h index 3d8668e..3f8ffe6 100644 --- a/include/ck_rwlock.h +++ b/include/ck_rwlock.h @@ -113,6 +113,7 @@ ck_rwlock_read_trylock(ck_rwlock_t *rw) return false; leave: + ck_pr_fence_load(); return true; } @@ -131,6 +132,7 @@ ck_rwlock_read_lock(ck_rwlock_t *rw) ck_pr_dec_uint(&rw->n_readers); } + ck_pr_fence_load(); return; }