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