System\Runtime\IOThreadScheduler.cs (11)
482int gateSnapshot = Interlocked.Increment(ref this.gate);
488Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot);
500gateSnapshot = Interlocked.Add(ref this.gate, Bits.LoHiBit);
515Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot) != gateSnapshot)
517gateSnapshot = Interlocked.Add(ref this.gate, Bits.HiHiBit);
520Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot);
531int gateSnapshot = Interlocked.Add(ref this.gate, Bits.HiOne);
555Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot) != gateSnapshot)
557gateSnapshot = Interlocked.Add(ref this.gate, Bits.HiHiBit);
560Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot);
572Interlocked.CompareExchange(ref this.gate, 0, gateSnapshot);