Lines Matching refs:state_

346   DCHECK_EQ(0, state_.LoadRelaxed());  in Mutex()
363 if (state_.LoadRelaxed() != 0) { in ~Mutex()
397 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveLock()
400 done = state_.CompareExchangeWeakAcquire(0 /* cur_state */, 1 /* new state */); in ExclusiveLock()
408 if (futex(state_.Address(), FUTEX_WAIT, 1, nullptr, nullptr, 0) != 0) { in ExclusiveLock()
418 DCHECK_EQ(state_.LoadRelaxed(), 1); in ExclusiveLock()
443 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveTryLock()
446 done = state_.CompareExchangeWeakAcquire(0 /* cur_state */, 1 /* new state */); in ExclusiveTryLock()
451 DCHECK_EQ(state_.LoadRelaxed(), 1); in ExclusiveTryLock()
500 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveUnlock()
508 done = state_.CompareExchangeWeakSequentiallyConsistent(cur_state, 0 /* new state */); in ExclusiveUnlock()
512 futex(state_.Address(), FUTEX_WAKE, 1, nullptr, nullptr, 0); in ExclusiveUnlock()
555 futex(state_.Address(), FUTEX_WAKE, -1, nullptr, nullptr, 0); in WakeupToRespondToEmptyCheckpoint()
565 , state_(0), num_pending_readers_(0), num_pending_writers_(0) in ReaderWriterMutex()
576 CHECK_EQ(state_.LoadRelaxed(), 0); in ~ReaderWriterMutex()
598 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveLock()
601 done = state_.CompareExchangeWeakAcquire(0 /* cur_state*/, -1 /* new state */); in ExclusiveLock()
609 if (futex(state_.Address(), FUTEX_WAIT, cur_state, nullptr, nullptr, 0) != 0) { in ExclusiveLock()
619 DCHECK_EQ(state_.LoadRelaxed(), -1); in ExclusiveLock()
637 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveUnlock()
645 … done = state_.CompareExchangeWeakSequentiallyConsistent(-1 /* cur_state*/, 0 /* new state */); in ExclusiveUnlock()
650 futex(state_.Address(), FUTEX_WAKE, -1, nullptr, nullptr, 0); in ExclusiveUnlock()
671 int32_t cur_state = state_.LoadRelaxed(); in ExclusiveLockWithTimeout()
674 done = state_.CompareExchangeWeakAcquire(0 /* cur_state */, -1 /* new state */); in ExclusiveLockWithTimeout()
688 if (futex(state_.Address(), FUTEX_WAIT, cur_state, &rel_ts, nullptr, 0) != 0) { in ExclusiveLockWithTimeout()
729 if (futex(state_.Address(), FUTEX_WAIT, cur_state, nullptr, nullptr, 0) != 0) { in HandleSharedLockContention()
743 int32_t cur_state = state_.LoadRelaxed(); in SharedTryLock()
746 done = state_.CompareExchangeWeakAcquire(cur_state, cur_state + 1); in SharedTryLock()
783 << " state=" << state_.LoadSequentiallyConsistent() in Dump()
807 futex(state_.Address(), FUTEX_WAKE, -1, nullptr, nullptr, 0); in WakeupToRespondToEmptyCheckpoint()
865 guard_.state_.Address(), cur_sequence) != -1; in Broadcast()