5 instantiations of Counts
System.Private.CoreLib (5)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (5)
492var countsAfterUpdate = new Counts(Interlocked.Add(ref _data, 1ul << SignalCountShift)); 522var countsAfterUpdate = new Counts(Interlocked.Add(ref _data, unchecked((ulong)-1) << WaiterCountShift)); 528var countsAfterUpdate = new Counts(Interlocked.Add(ref _data, unchecked((ulong)1) << WaiterCountShift)); 541var countsAfterUpdate = new Counts(_data); 552new Counts(Interlocked.CompareExchange(ref _data, newCounts._data, oldCounts._data));
32 references to Counts
System.Private.CoreLib (32)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelLifoSemaphore.cs (32)
89Counts counts = _separated._counts; 92Counts newCounts = counts; 94Counts countsBeforeUpdate = _separated._counts.InterlockedCompareExchange(newCounts, counts); 116Counts counts = _separated._counts; 119Counts newCounts = counts; 121Counts countsBeforeUpdate = _separated._counts.InterlockedCompareExchange(newCounts, counts); 138Counts counts = _separated._counts.InterlockedIncrementWaiterCount(); 156private static bool HasWaitersToWake(Counts counts) => 161private void MaybeWakeWaiter(Counts counts) 173private void MaybeWakeWaiterSlow(Counts counts) 180Counts newCounts = counts; 183Counts countsBeforeUpdate = _separated._counts.InterlockedCompareExchange(newCounts, counts); 238Counts counts = _separated._counts; 239Counts newCounts = counts; 254Counts countsBeforeUpdate = _separated._counts.InterlockedCompareExchange(newCounts, counts); 278Counts counts = _separated._counts.InterlockedIncrementSignalCount(); 473private struct Counts : IEquatable<Counts> 490public Counts InterlockedIncrementSignalCount() 492var countsAfterUpdate = new Counts(Interlocked.Add(ref _data, 1ul << SignalCountShift)); 522var countsAfterUpdate = new Counts(Interlocked.Add(ref _data, unchecked((ulong)-1) << WaiterCountShift)); 526public Counts InterlockedIncrementWaiterCount() 528var countsAfterUpdate = new Counts(Interlocked.Add(ref _data, unchecked((ulong)1) << WaiterCountShift)); 541var countsAfterUpdate = new Counts(_data); 551public Counts InterlockedCompareExchange(Counts newCounts, Counts oldCounts) => 554public static bool operator ==(Counts lhs, Counts rhs) => lhs.Equals(rhs); 555public static bool operator !=(Counts lhs, Counts rhs) => !lhs.Equals(rhs); 557public override bool Equals([NotNullWhen(true)] object? obj) => obj is Counts other && Equals(other); 558public bool Equals(Counts other) => _data == other._data;