Searched refs:cur_state (Results 1 – 2 of 2) sorted by relevance
156 int32_t cur_state = state_.LoadRelaxed(); in SharedLock() local157 if (LIKELY(cur_state >= 0)) { in SharedLock()159 done = state_.CompareExchangeWeakAcquire(cur_state, cur_state + 1); in SharedLock()164 if (futex(state_.Address(), FUTEX_WAIT, cur_state, NULL, NULL, 0) != 0) { in SharedLock()188 int32_t cur_state = state_.LoadRelaxed(); in SharedUnlock() local189 if (LIKELY(cur_state > 0)) { in SharedUnlock()194 done = state_.CompareExchangeWeakSequentiallyConsistent(cur_state, cur_state - 1); in SharedUnlock()195 if (done && (cur_state - 1) == 0) { // Weak CAS may fail spuriously. in SharedUnlock()203 LOG(FATAL) << "Unexpected state_:" << cur_state << " for " << name_; in SharedUnlock()
322 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveLock() local323 if (LIKELY(cur_state == 0)) { in ExclusiveLock()365 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveTryLock() local366 if (cur_state == 0) { in ExclusiveTryLock()411 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveUnlock() local412 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[all …]