AtomicInt64
Various atomic operations for Int64 data type
accessible as extension methods.
public static long AccumulateAndGet(this ref long value, long x, Func<long, long, long> accumulator)
Atomically updates the current value with the results of applying the given function
to the current and given values, returning the updated value.
Adds two 64-bit integers and replaces referenced integer with the sum,
as an atomic operation.
Bitwise "ands" two 64-bit integers and replaces referenced integer with the result,
as an atomic operation.
Bitwise "ors" two 64-bit integers and replaces referenced integer with the result,
as an atomic operation.
Bitwise "xors" two 64-bit integers and replaces referenced integer with the result,
as an atomic operation.
Atomically sets referenced value to the given updated value if the current value == the expected value.
Atomically decrements by one the current value.
public static long GetAndAccumulate(this ref long value, long x, Func<long, long, long> accumulator)
Atomically updates the current value with the results of applying the given function
to the current and given values, returning the original value.
Adds two 64-bit integers and replaces referenced integer with the sum,
as an atomic operation.
Bitwise "ands" two 64-bit integers and replaces referenced integer with the result,
as an atomic operation.
Bitwise "ors" two 64-bit integers and replaces referenced integer with the result,
as an atomic operation.
Bitwise "xors" two 64-bit integers and replaces referenced integer with the result,
as an atomic operation.
Modifies referenced value atomically.
Atomically updates the stored value with the results
of applying the given function, returning the original value.
Atomically increments by one referenced value.
Modifies value atomically.
Atomically updates the stored value 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.
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.