RW_LOCK_WRITER_COUNT_BASE
if (oldCount >= RW_LOCK_WRITER_COUNT_BASE)
if (oldCount >= RW_LOCK_WRITER_COUNT_BASE)
if (oldCount >= RW_LOCK_WRITER_COUNT_BASE)
return RW_LOCK_WRITER_COUNT_BASE;
if (lock->count >= RW_LOCK_WRITER_COUNT_BASE)
if (oldCount < RW_LOCK_WRITER_COUNT_BASE) {
if (lock->count >= RW_LOCK_WRITER_COUNT_BASE)
ASSERT(lock->count >= RW_LOCK_WRITER_COUNT_BASE);
if (oldCount < RW_LOCK_WRITER_COUNT_BASE) {
if (lock->count >= RW_LOCK_WRITER_COUNT_BASE)
ASSERT(lock->count >= RW_LOCK_WRITER_COUNT_BASE);
if (oldCount < RW_LOCK_WRITER_COUNT_BASE) {
ASSERT((lock->owner_count % RW_LOCK_WRITER_COUNT_BASE) > 0);
lock->owner_count += RW_LOCK_WRITER_COUNT_BASE;
int32 oldCount = atomic_add(&lock->count, RW_LOCK_WRITER_COUNT_BASE);
lock->owner_count = RW_LOCK_WRITER_COUNT_BASE;
if (oldCount < RW_LOCK_WRITER_COUNT_BASE)
lock->owner_count = RW_LOCK_WRITER_COUNT_BASE;
ASSERT(lock->owner_count >= RW_LOCK_WRITER_COUNT_BASE);
lock->owner_count -= RW_LOCK_WRITER_COUNT_BASE;
if (lock->owner_count >= RW_LOCK_WRITER_COUNT_BASE)
int32 oldCount = atomic_add(&lock->count, -RW_LOCK_WRITER_COUNT_BASE);
oldCount -= RW_LOCK_WRITER_COUNT_BASE;
if (oldCount >= RW_LOCK_WRITER_COUNT_BASE) {
return RW_LOCK_WRITER_COUNT_BASE;
if (lock->count >= RW_LOCK_WRITER_COUNT_BASE)
if (lock->count >= RW_LOCK_WRITER_COUNT_BASE)
if (lock->count >= RW_LOCK_WRITER_COUNT_BASE)
ASSERT(lock->count >= RW_LOCK_WRITER_COUNT_BASE);
lock->owner_count += RW_LOCK_WRITER_COUNT_BASE;
int32 oldCount = atomic_add(&lock->count, RW_LOCK_WRITER_COUNT_BASE);
lock->owner_count = RW_LOCK_WRITER_COUNT_BASE;
if (oldCount < RW_LOCK_WRITER_COUNT_BASE)
lock->owner_count = RW_LOCK_WRITER_COUNT_BASE;
lock->owner_count -= RW_LOCK_WRITER_COUNT_BASE;
if (lock->owner_count >= RW_LOCK_WRITER_COUNT_BASE)
int32 oldCount = atomic_add(&lock->count, -RW_LOCK_WRITER_COUNT_BASE);
oldCount -= RW_LOCK_WRITER_COUNT_BASE;
if (oldCount >= RW_LOCK_WRITER_COUNT_BASE) {
if (oldCount >= RW_LOCK_WRITER_COUNT_BASE)