56 references to m_state
mscorlib (56)
system\threading\Tasks\ProducerConsumerQueues.cs (56)
162
int last = segment.
m_state
.m_last; // local copy to avoid multiple volatile reads
166
if (tail2 != segment.
m_state
.m_firstCopy)
169
segment.
m_state
.m_last = tail2;
182
if (segment.
m_state
.m_firstCopy != segment.
m_state
.m_first)
184
segment.
m_state
.m_firstCopy = segment.
m_state
.m_first;
195
newSegment.
m_state
.m_last = 1;
196
newSegment.
m_state
.m_lastCopy = 1;
214
int first = segment.
m_state
.m_first; // local copy to avoid multiple volatile reads
217
if (first != segment.
m_state
.m_lastCopy)
221
segment.
m_state
.m_first = (first + 1) & (array.Length - 1);
238
if (segment.
m_state
.m_last != segment.
m_state
.m_lastCopy)
240
segment.
m_state
.m_lastCopy = segment.
m_state
.m_last;
244
if (segment.m_next != null && segment.
m_state
.m_first == segment.
m_state
.m_last)
251
var first = segment.
m_state
.m_first; // local copy to avoid extraneous volatile reads
253
if (first == segment.
m_state
.m_last)
261
segment.
m_state
.m_first = (first + 1) & (segment.m_array.Length - 1);
262
segment.
m_state
.m_lastCopy = segment.
m_state
.m_last; // Refresh m_lastCopy to ensure that m_first has not passed m_lastCopy
274
int first = segment.
m_state
.m_first; // local copy to avoid multiple volatile reads
277
if (first != segment.
m_state
.m_lastCopy)
296
if (segment.
m_state
.m_last != segment.
m_state
.m_lastCopy)
298
segment.
m_state
.m_lastCopy = segment.
m_state
.m_last;
302
if (segment.m_next != null && segment.
m_state
.m_first == segment.
m_state
.m_last)
309
var first = segment.
m_state
.m_first; // local copy to avoid extraneous volatile reads
311
if (first == segment.
m_state
.m_last)
329
int first = segment.
m_state
.m_first; // local copy to avoid multiple volatile reads
332
if (first != segment.
m_state
.m_lastCopy)
338
segment.
m_state
.m_first = (first + 1) & (array.Length - 1);
362
if (segment.
m_state
.m_last != segment.
m_state
.m_lastCopy)
364
segment.
m_state
.m_lastCopy = segment.
m_state
.m_last;
368
if (segment.m_next != null && segment.
m_state
.m_first == segment.
m_state
.m_last)
375
var first = segment.
m_state
.m_first; // local copy to avoid extraneous volatile reads
377
if (first == segment.
m_state
.m_last)
387
segment.
m_state
.m_first = (first + 1) & (segment.m_array.Length - 1);
388
segment.
m_state
.m_lastCopy = segment.
m_state
.m_last; // Refresh m_lastCopy to ensure that m_first has not passed m_lastCopy
412
if (head.
m_state
.m_first != head.
m_state
.m_lastCopy) return false; // m_first is volatile, so the read of m_lastCopy cannot get reordered
413
if (head.
m_state
.m_first != head.
m_state
.m_last) return false;
424
for (int pt = segment.
m_state
.m_first;
425
pt != segment.
m_state
.m_last;
449
first = segment.
m_state
.m_first;
450
last = segment.
m_state
.m_last;
451
if (first == segment.
m_state
.m_first) break;