private static ref int Reinterpret(ref SeqNum location) { return(ref Unsafe.As <SeqNum, int>(ref location)); }
public static SeqNum CompareExchange(ref SeqNum location, SeqNum value, SeqNum comparand) { return((SeqNum)Interlocked.CompareExchange(ref Reinterpret(ref location), value.RawValue, comparand.RawValue)); }
public static SeqNum Decrement(ref SeqNum location) { return((SeqNum)Interlocked.Decrement(ref Reinterpret(ref location))); }
public static SeqNum Exchange(ref SeqNum location, SeqNum value) { return((SeqNum)Interlocked.Exchange(ref Reinterpret(ref location), value.RawValue)); }
public static SeqNum Add(ref SeqNum location, int value) { return((SeqNum)Interlocked.Add(ref Reinterpret(ref location), value)); }