public static T CompareExchange <T>(ref T location1, T value, T comparand) where T : class { return(Unsafe.As <T>(RuntimeImports.InterlockedCompareExchange(ref Unsafe.As <T, Object>(ref location1), value, comparand))); }
public static IntPtr CompareExchange(ref IntPtr location1, IntPtr value, IntPtr comparand) { return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand)); }
public static int CompareExchange(ref int location1, int value, int comparand) { return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand)); }
public static long CompareExchange(ref long location1, long value, long comparand) { return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand)); }
public static object CompareExchange(ref object location1, object value, object comparand) { return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand)); }