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