AtomicIntPtr
Various atomic operations for IntPtr data type
accessible as extension methods.
public static IntPtr AccumulateAndGet(this ref IntPtr value, IntPtr x, Func<IntPtr, IntPtr, IntPtr> accumulator)
Atomically updates the current value with the results of applying the given function
to the current and given values, returning the updated value.
Atomically updates the current value with the results of applying the given function
to the current and given values, returning the updated value.
public static IntPtr AccumulateAndGet(this IntPtr[] array, long index, IntPtr x, Func<IntPtr, IntPtr, IntPtr> accumulator)
Atomically updates the array element with the results of applying the given function
to the array element and given values, returning the updated value.
public static IntPtr AccumulateAndGet(this IntPtr[] array, long index, IntPtr x, ref ValueFunc accumulator)
Atomically updates the array element with the results of applying the given function
to the array element and given values, returning the updated value.
Adds two native integers and replaces referenced storage with the sum,
as an atomic operation.
Atomically sets the referenced value to the given updated value if the current value == the expected value.
Atomically sets array element to the given updated value if the array element == the expected value.
public static IntPtr CompareExchange(this IntPtr[] array, long index, IntPtr update, IntPtr comparand)
Atomically sets array element to the given updated value if the array element == the expected value.
Atomically decrements the referenced value by one.
Atomically decrements the array element by one.
public static IntPtr GetAndAccumulate(this ref IntPtr value, IntPtr x, Func<IntPtr, IntPtr, IntPtr> accumulator)
Atomically updates the current value with the results of applying the given function
to the current and given values, returning the original value.
Atomically updates the current value with the results of applying the given function
to the current and given values, returning the original value.
public static IntPtr GetAndAccumulate(this IntPtr[] array, long index, IntPtr x, Func<IntPtr, IntPtr, IntPtr> accumulator)
Atomically updates the array element with the results of applying the given function
to the array element and given values, returning the original value.
public static IntPtr GetAndAccumulate(this IntPtr[] array, long index, IntPtr x, ref ValueFunc accumulator)
Atomically updates the array element with the results of applying the given function
to the array element and given values, returning the original value.
Modifies the referenced value atomically.
Modifies the array element atomically.
Atomically updates the stored value with the results
of applying the given function, returning the original value.
Atomically updates the stored value with the results
of applying the given function, returning the original value.
Atomically updates the array element with the results
of applying the given function, returning the original value.
Atomically updates the array element with the results
of applying the given function, returning the original value.
Atomically increments the referenced value by one.
Atomically increments the array element by one.
Modifies the referenced value atomically.
Modifies the array element atomically.
Atomically updates the stored value with the results
of applying the given function, returning the updated value.
Atomically updates the stored value with the results
of applying the given function, returning the updated value.
Atomically updates the array element with the results
of applying the given function, returning the updated value.
Atomically updates the array element with the results
of applying the given function, returning the updated value.
Reads the value of the specified field. On systems that require it, inserts a
memory barrier that prevents the processor from reordering memory operations
as follows: If a read or write appears after this method in the code, the processor
cannot move it before this method.
Performs volatile read of the array element.
Writes the specified value to the specified field. On systems that require it,
inserts a memory barrier that prevents the processor from reordering memory operations
as follows: If a read or write appears before this method in the code, the processor
cannot move it after this method.
Performs volatile write to the array element.