RW_READ_LOCK
lock_value = RW_READ_LOCK;
lock_value = RW_READ_LOCK;
lock_value = RW_READ_LOCK;
new = nreaders * RW_READ_LOCK;
if (lock_value == RW_READ_LOCK) {
if (casip(&lp->rw_wwwh, old, old + RW_READ_LOCK) == old)
RW_READ_LOCK - RW_WRITE_LOCK(curthread)) & RW_HAS_WAITERS) {
uintptr_t delta = nreaders * RW_READ_LOCK;
if (((old = lp->rw_wwwh) & ~RW_HAS_WAITERS) != RW_READ_LOCK)
new = old + RW_WRITE_LOCK(curthread) - RW_READ_LOCK;
#define RW_HOLD_COUNT (-RW_READ_LOCK)
#define RW_DOUBLE_LOCK (RW_WRITE_LOCK(0) | RW_READ_LOCK)