ck_rwlock: Relax write_trylock_rtm semantics.

trylock semantics are best effort to begin with, so
avoid fallback path all together.
ck_pring
Samy Al Bahra 12 years ago
parent 3fbefc5042
commit a694e871ca

@ -124,9 +124,8 @@ ck_rwlock_write_trylock_rtm(ck_rwlock_t *rw)
{
bool r;
if (ck_pr_rtm_begin() != CK_PR_RTM_STARTED) {
return ck_rwlock_write_trylock(rw);
}
if (ck_pr_rtm_begin() != CK_PR_RTM_STARTED)
return false;
r = ck_pr_load_uint(&rw->writer) != 0;

Loading…
Cancel
Save