Example #1
0
 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)));
 }
Example #2
0
 public static IntPtr CompareExchange(ref IntPtr location1, IntPtr value, IntPtr comparand)
 {
     return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand));
 }
Example #3
0
 public static int CompareExchange(ref int location1, int value, int comparand)
 {
     return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand));
 }
Example #4
0
 public static long CompareExchange(ref long location1, long value, long comparand)
 {
     return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand));
 }
Example #5
0
 public static object CompareExchange(ref object location1, object value, object comparand)
 {
     return(RuntimeImports.InterlockedCompareExchange(ref location1, value, comparand));
 }