18 writes to _state
System.Threading (18)
System\Threading\ReaderWriterLock.cs (18)
85if (Interlocked.CompareExchange(ref _state, LockStates.Reader, 0) == 0) 132currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.Reader, knownState); 186currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.WaitingReader, knownState); 215knownState = Interlocked.Add(ref _state, modifyState) - modifyState; 241Interlocked.Add(ref _state, LockStates.Reader - LockStates.ReaderSignaled); 264Interlocked.Add(ref _state, -LockStates.ReaderSignaled); 287if (Interlocked.CompareExchange(ref _state, LockStates.Writer, 0) == 0) 313currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.Writer, knownState); 356currentState = Interlocked.CompareExchange(ref _state, knownState + LockStates.WaitingWriter, knownState); 380knownState = Interlocked.Add(ref _state, modifyState) - modifyState; 407knownState = Interlocked.Add(ref _state, modifyState) - modifyState; 533currentState = Interlocked.CompareExchange(ref _state, knownState + modifyState, knownState); 641currentState = Interlocked.CompareExchange(ref _state, knownState + modifyState, knownState); 702int knownState = Interlocked.CompareExchange(ref _state, LockStates.Writer, LockStates.Reader); 811currentState = Interlocked.CompareExchange(ref _state, knownState + modifyState, knownState); 941if (Interlocked.CompareExchange(ref _state, LockStates.Writer, 0) == 0) 958Interlocked.CompareExchange(ref _state, knownState + LockStates.Reader, knownState) == knownState) 1099Interlocked.Add(ref _state, -LockStates.CachingEvents);
40 references to _state
System.Threading (40)
System\Threading\ReaderWriterLock.cs (40)
92Debug.Assert((_state & LockStates.ReadersMask) != 0); 111int currentState = _state; 157currentState = _state; 174currentState = _state; 181currentState = _state; 207Debug.Assert((_state & LockStates.ReaderSignaled) != 0); 208Debug.Assert((_state & LockStates.ReadersMask) < LockStates.ReadersMask); 237Debug.Assert((_state & LockStates.ReadersMask) < LockStates.ReadersMask); 272Debug.Assert((_state & LockStates.Writer) == 0); 273Debug.Assert((_state & LockStates.ReadersMask) != 0); 289Debug.Assert((_state & LockStates.ReadersMask) == 0); 304int currentState = _state; 327currentState = _state; 344currentState = _state; 351currentState = _state; 373Debug.Assert((_state & LockStates.WriterSignaled) != 0); 394knownState = _state; 430Debug.Assert((_state & LockStates.Writer) != 0); 431Debug.Assert((_state & LockStates.ReadersMask) == 0); 458Debug.Assert((_state & LockStates.Writer) == 0); 459Debug.Assert((_state & LockStates.ReadersMask) != 0); 473int currentState = _state; 492currentState = _state; 517currentState = _state; 542Debug.Assert((_state & LockStates.WriterSignaled) != 0); 549Debug.Assert((_state & LockStates.ReaderSignaled) != 0); 570Debug.Assert((_state & LockStates.ReadersMask) == 0); 571Debug.Assert((_state & LockStates.Writer) != 0); 586int currentState = _state; 612currentState = _state; 626currentState = _state; 647Debug.Assert((_state & LockStates.ReaderSignaled) != 0); 654Debug.Assert((_state & LockStates.WriterSignaled) != 0); 694Debug.Assert((_state & LockStates.ReadersMask) != 0); 778int currentState = _state; 802currentState = _state; 817Debug.Assert((_state & LockStates.ReaderSignaled) != 0); 897Debug.Assert((_state & LockStates.ReadersMask) != 0); 956int knownState = _state; 1090Debug.Assert((_state & LockStates.CachingEvents) == LockStates.CachingEvents);