ck_rwlock: Remove unncessary load fences, switch to full semantics on read unlock.

rwlock may also be used in SPMC workloads.
ck_pring
Samy Al Bahra 12 years ago
parent 65ebf86799
commit bf30d3439c

@ -113,7 +113,6 @@ ck_rwlock_read_trylock(ck_rwlock_t *rw)
return false;
leave:
ck_pr_fence_load();
return true;
}
@ -132,7 +131,6 @@ ck_rwlock_read_lock(ck_rwlock_t *rw)
ck_pr_dec_uint(&rw->n_readers);
}
ck_pr_fence_load();
return;
}
@ -140,7 +138,7 @@ CK_CC_INLINE static void
ck_rwlock_read_unlock(ck_rwlock_t *rw)
{
ck_pr_fence_load();
ck_pr_fence_memory();
ck_pr_dec_uint(&rw->n_readers);
return;
}

Loading…
Cancel
Save