Lines Matching refs:cur_state
322 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveLock() local
323 if (LIKELY(cur_state == 0)) { in ExclusiveLock()
365 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveTryLock() local
366 if (cur_state == 0) { in ExclusiveTryLock()
411 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveUnlock() local
412 if (LIKELY(cur_state == 1)) { in ExclusiveUnlock()
419 done = state_.CompareExchangeWeakSequentiallyConsistent(cur_state, 0 /* new state */); in ExclusiveUnlock()
429 LOG(FATAL) << "Unexpected state_ in unlock " << cur_state << " for " << name_; in ExclusiveUnlock()
433 cur_state, name_).c_str()); in ExclusiveUnlock()
498 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveLock() local
499 if (LIKELY(cur_state == 0)) { in ExclusiveLock()
506 if (futex(state_.Address(), FUTEX_WAIT, cur_state, NULL, NULL, 0) != 0) { in ExclusiveLock()
534 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveUnlock() local
535 if (LIKELY(cur_state == -1)) { in ExclusiveUnlock()
551 LOG(FATAL) << "Unexpected state_:" << cur_state << " for " << name_; in ExclusiveUnlock()
568 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveLockWithTimeout() local
569 if (cur_state == 0) { in ExclusiveLockWithTimeout()
582 if (futex(state_.Address(), FUTEX_WAIT, cur_state, &rel_ts, NULL, 0) != 0) { in ExclusiveLockWithTimeout()
620 int32_t cur_state = state_.LoadRelaxed(); in SharedTryLock() local
621 if (cur_state >= 0) { in SharedTryLock()
623 done = state_.CompareExchangeWeakAcquire(cur_state, cur_state + 1); in SharedTryLock()