Lines Matching defs:cur_state
368 int32_t cur_state = state_.LoadRelaxed();
369 if (LIKELY(cur_state == 0)) {
371 done = state_.CompareExchangeWeakAcquire(0 /* cur_state */, 1 /* new state */);
411 int32_t cur_state = state_.LoadRelaxed();
412 if (cur_state == 0) {
414 done = state_.CompareExchangeWeakAcquire(0 /* cur_state */, 1 /* new state */);
468 cur_state = state_.LoadRelaxed();
469 if (LIKELY(cur_state == 1)) {
476 done = state_.CompareExchangeWeakSequentiallyConsistent(cur_state, 0 /* new state */);
486 LOG(FATAL) << "Unexpected state_ in unlock " << cur_state << " for " << name_;
490 cur_state, name_).c_str());
555 int32_t cur_state = state_.LoadRelaxed();
556 if (LIKELY(cur_state == 0)) {
558 done = state_.CompareExchangeWeakAcquire(0 /* cur_state*/, -1 /* new state */);
563 if (futex(state_.Address(), FUTEX_WAIT, cur_state, nullptr, nullptr, 0) != 0) {
591 int32_t cur_state = state_.LoadRelaxed();
592 if (LIKELY(cur_state == -1)) {
599 done = state_.CompareExchangeWeakSequentiallyConsistent(-1 /* cur_state*/, 0 /* new state */);
608 LOG(FATAL) << "Unexpected state_:" << cur_state << " for " << name_;
625 int32_t cur_state = state_.LoadRelaxed();
626 if (cur_state == 0) {
628 done = state_.CompareExchangeWeakAcquire(0 /* cur_state */, -1 /* new state */);
639 if (futex(state_.Address(), FUTEX_WAIT, cur_state, &rel_ts, nullptr, 0) != 0) {
673 void ReaderWriterMutex::HandleSharedLockContention(Thread* self, int32_t cur_state) {
677 if (futex(state_.Address(), FUTEX_WAIT, cur_state, nullptr, nullptr, 0) != 0) {
691 int32_t cur_state = state_.LoadRelaxed();
692 if (cur_state >= 0) {
694 done = state_.CompareExchangeWeakAcquire(cur_state, cur_state + 1);