Show / Hide Table of Contents

Class AtomicPointer

Represents atomic operations that can be applied to the value referenced by pointer.

Inheritance
Object
AtomicPointer
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: DotNext.Threading
Assembly: DotNext.Unsafe.dll
Syntax
public static class AtomicPointer

Methods

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Double>, Double, Func<Double, Double, Double>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static double AccumulateAndGetValue(this Pointer<double> pointer, double x, Func<double, double, double> accumulator)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double x

Accumulator operand.

Func<Double, Double, Double> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Double

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Double>, Double, ValueFunc<Double, Double, Double>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static double AccumulateAndGetValue(this Pointer<double> pointer, double x, ValueFunc<double, double, double> accumulator)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double x

Accumulator operand.

ValueFunc<Double, Double, Double> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Double

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Int32>, Int32, Func<Int32, Int32, Int32>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static int AccumulateAndGetValue(this Pointer<int> pointer, int x, Func<int, int, int> accumulator)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 x

Accumulator operand.

Func<Int32, Int32, Int32> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int32

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Int32>, Int32, ValueFunc<Int32, Int32, Int32>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static int AccumulateAndGetValue(this Pointer<int> pointer, int x, ValueFunc<int, int, int> accumulator)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 x

Accumulator operand.

ValueFunc<Int32, Int32, Int32> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int32

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Int64>, Int64, Func<Int64, Int64, Int64>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static long AccumulateAndGetValue(this Pointer<long> pointer, long x, Func<long, long, long> accumulator)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 x

Accumulator operand.

Func<Int64, Int64, Int64> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int64

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Int64>, Int64, ValueFunc<Int64, Int64, Int64>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static long AccumulateAndGetValue(this Pointer<long> pointer, long x, ValueFunc<long, long, long> accumulator)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 x

Accumulator operand.

ValueFunc<Int64, Int64, Int64> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int64

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<IntPtr>, IntPtr, Func<IntPtr, IntPtr, IntPtr>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static IntPtr AccumulateAndGetValue(this Pointer<IntPtr> pointer, IntPtr x, Func<IntPtr, IntPtr, IntPtr> accumulator)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr x

Accumulator operand.

Func<IntPtr, IntPtr, IntPtr> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
IntPtr

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<IntPtr>, IntPtr, ValueFunc<IntPtr, IntPtr, IntPtr>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static IntPtr AccumulateAndGetValue(this Pointer<IntPtr> pointer, IntPtr x, ValueFunc<IntPtr, IntPtr, IntPtr> accumulator)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr x

Accumulator operand.

ValueFunc<IntPtr, IntPtr, IntPtr> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
IntPtr

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Single>, Single, Func<Single, Single, Single>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static float AccumulateAndGetValue(this Pointer<float> pointer, float x, Func<float, float, float> accumulator)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single x

Accumulator operand.

Func<Single, Single, Single> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Single

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AccumulateAndGetValue(Pointer<Single>, Single, ValueFunc<Single, Single, Single>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the updated value.

Declaration
public static float AccumulateAndGetValue(this Pointer<float> pointer, float x, ValueFunc<float, float, float> accumulator)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single x

Accumulator operand.

ValueFunc<Single, Single, Single> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Single

The updated value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

AddValue(Pointer<Double>, Double)

Adds two numbers and replaces the first number with the sum, as an atomic operation.

Declaration
public static double AddValue(this Pointer<double> pointer, double value)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double value

The value to be added to the number located in the memory at the address specified by pointer.

Returns
Type Description
Double

The new value stored at memory address.

| Improve this Doc View Source

AddValue(Pointer<Int32>, Int32)

Adds two integers and replaces the first integer with the sum, as an atomic operation.

Declaration
public static int AddValue(this Pointer<int> pointer, int value)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 value

The value to be added to the integer located in the memory at the address specified by pointer.

Returns
Type Description
Int32

The new value stored at memory address.

| Improve this Doc View Source

AddValue(Pointer<Int64>, Int64)

Adds two integers and replaces the first integer with the sum, as an atomic operation.

Declaration
public static long AddValue(this Pointer<long> pointer, long value)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 value

The value to be added to the integer located in the memory at the address specified by pointer.

Returns
Type Description
Int64

The new value stored at memory address.

| Improve this Doc View Source

AddValue(Pointer<IntPtr>, IntPtr)

Adds two integers and replaces the first integer with the sum, as an atomic operation.

Declaration
public static IntPtr AddValue(this Pointer<IntPtr> pointer, IntPtr value)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr value

The value to be added to the integer located in the memory at the address specified by pointer.

Returns
Type Description
IntPtr

The new value stored at memory address.

| Improve this Doc View Source

AddValue(Pointer<Single>, Single)

Adds two numbers and replaces the first number with the sum, as an atomic operation.

Declaration
public static float AddValue(this Pointer<float> pointer, float value)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single value

The value to be added to the number located in the memory at the address specified by pointer.

Returns
Type Description
Single

The new value stored at memory address.

| Improve this Doc View Source

CompareAndSetValue(Pointer<Double>, Double, Double)

Atomically sets a value located at the specified address in the memory to the given updated value if the current value == the expected value.

Declaration
public static bool CompareAndSetValue(this Pointer<double> pointer, double expected, double update)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double expected

The expected value.

Double update

The new value.

Returns
Type Description
Boolean

true if successful. false return indicates that the actual value was not equal to the expected value.

| Improve this Doc View Source

CompareAndSetValue(Pointer<Int32>, Int32, Int32)

Atomically sets a value located at the specified address in the memory to the given updated value if the current value == the expected value.

Declaration
public static bool CompareAndSetValue(this Pointer<int> pointer, int expected, int update)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 expected

The expected value.

Int32 update

The new value.

Returns
Type Description
Boolean

true if successful. false return indicates that the actual value was not equal to the expected value.

| Improve this Doc View Source

CompareAndSetValue(Pointer<Int64>, Int64, Int64)

Atomically sets a value located at the specified address in the memory to the given updated value if the current value == the expected value.

Declaration
public static bool CompareAndSetValue(this Pointer<long> pointer, long expected, long update)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 expected

The expected value.

Int64 update

The new value.

Returns
Type Description
Boolean

true if successful. false return indicates that the actual value was not equal to the expected value.

| Improve this Doc View Source

CompareAndSetValue(Pointer<IntPtr>, IntPtr, IntPtr)

Atomically sets a value located at the specified address in the memory to the given updated value if the current value == the expected value.

Declaration
public static bool CompareAndSetValue(this Pointer<IntPtr> pointer, IntPtr expected, IntPtr update)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr expected

The expected value.

IntPtr update

The new value.

Returns
Type Description
Boolean

true if successful. false return indicates that the actual value was not equal to the expected value.

| Improve this Doc View Source

CompareAndSetValue(Pointer<Single>, Single, Single)

Atomically sets a value located at the specified address in the memory to the given updated value if the current value == the expected value.

Declaration
public static bool CompareAndSetValue(this Pointer<float> pointer, float expected, float update)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single expected

The expected value.

Single update

The new value.

Returns
Type Description
Boolean

true if successful. false return indicates that the actual value was not equal to the expected value.

| Improve this Doc View Source

CompareExchangeValue(Pointer<Double>, Double, Double)

Compares two 64-bit floating-point numbers for equality and, if they are equal, replaces the first value.

Declaration
public static double CompareExchangeValue(this Pointer<double> pointer, double value, double comparand)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double value

The value that replaces the destination value if the comparison results in equality.

Double comparand

The value that is compared to the value at the memory address.

Returns
Type Description
Double

The original value that was in the memory before.

| Improve this Doc View Source

CompareExchangeValue(Pointer<Int32>, Int32, Int32)

Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value.

Declaration
public static int CompareExchangeValue(this Pointer<int> pointer, int value, int comparand)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 value

The value that replaces the destination value if the comparison results in equality.

Int32 comparand

The value that is compared to the value at the memory address.

Returns
Type Description
Int32

The original value that was in the memory before.

| Improve this Doc View Source

CompareExchangeValue(Pointer<Int64>, Int64, Int64)

Compares two 64-bit signed integers for equality and, if they are equal, replaces the first value.

Declaration
public static long CompareExchangeValue(this Pointer<long> pointer, long value, long comparand)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 value

The value that replaces the destination value if the comparison results in equality.

Int64 comparand

The value that is compared to the value at the memory address.

Returns
Type Description
Int64

The original value that was in the memory before.

| Improve this Doc View Source

CompareExchangeValue(Pointer<IntPtr>, IntPtr, IntPtr)

Compares two native-sized signed integers for equality and, if they are equal, replaces the first value.

Declaration
public static IntPtr CompareExchangeValue(this Pointer<IntPtr> pointer, IntPtr value, IntPtr comparand)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr value

The value that replaces the destination value if the comparison results in equality.

IntPtr comparand

The value that is compared to the value at the memory address.

Returns
Type Description
IntPtr

The original value that was in the memory before.

| Improve this Doc View Source

CompareExchangeValue(Pointer<Single>, Single, Single)

Compares two 32-bit floating-point numbers for equality and, if they are equal, replaces the first value.

Declaration
public static float CompareExchangeValue(this Pointer<float> pointer, float value, float comparand)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single value

The value that replaces the destination value if the comparison results in equality.

Single comparand

The value that is compared to the value at the memory address.

Returns
Type Description
Single

The original value that was in the memory before.

| Improve this Doc View Source

DecrementValue(Pointer<Double>)

Decrements a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static double DecrementValue(this Pointer<double> pointer)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be decremented.

Returns
Type Description
Double

The incremented value.

| Improve this Doc View Source

DecrementValue(Pointer<Int32>)

Decrements a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static int DecrementValue(this Pointer<int> pointer)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be decremented.

Returns
Type Description
Int32

The incremented value.

| Improve this Doc View Source

DecrementValue(Pointer<Int64>)

Decrements a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static long DecrementValue(this Pointer<long> pointer)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be decremented.

Returns
Type Description
Int64

The decremented value.

| Improve this Doc View Source

DecrementValue(Pointer<IntPtr>)

Decrements a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static IntPtr DecrementValue(this Pointer<IntPtr> pointer)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be decremented.

Returns
Type Description
IntPtr

The decremented value.

| Improve this Doc View Source

DecrementValue(Pointer<Single>)

Decrements a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static float DecrementValue(this Pointer<float> pointer)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be decremented.

Returns
Type Description
Single

The incremented value.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Double>, Double, Func<Double, Double, Double>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static double GetAndAccumulateValue(this Pointer<double> pointer, double x, Func<double, double, double> accumulator)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double x

Accumulator operand.

Func<Double, Double, Double> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Double

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Double>, Double, ValueFunc<Double, Double, Double>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static double GetAndAccumulateValue(this Pointer<double> pointer, double x, ValueFunc<double, double, double> accumulator)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double x

Accumulator operand.

ValueFunc<Double, Double, Double> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Double

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Int32>, Int32, Func<Int32, Int32, Int32>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static int GetAndAccumulateValue(this Pointer<int> pointer, int x, Func<int, int, int> accumulator)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 x

Accumulator operand.

Func<Int32, Int32, Int32> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int32

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Int32>, Int32, ValueFunc<Int32, Int32, Int32>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static int GetAndAccumulateValue(this Pointer<int> pointer, int x, ValueFunc<int, int, int> accumulator)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 x

Accumulator operand.

ValueFunc<Int32, Int32, Int32> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int32

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Int64>, Int64, Func<Int64, Int64, Int64>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static long GetAndAccumulateValue(this Pointer<long> pointer, long x, Func<long, long, long> accumulator)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 x

Accumulator operand.

Func<Int64, Int64, Int64> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int64

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Int64>, Int64, ValueFunc<Int64, Int64, Int64>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static long GetAndAccumulateValue(this Pointer<long> pointer, long x, ValueFunc<long, long, long> accumulator)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 x

Accumulator operand.

ValueFunc<Int64, Int64, Int64> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Int64

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<IntPtr>, IntPtr, Func<IntPtr, IntPtr, IntPtr>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static IntPtr GetAndAccumulateValue(this Pointer<IntPtr> pointer, IntPtr x, Func<IntPtr, IntPtr, IntPtr> accumulator)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr x

Accumulator operand.

Func<IntPtr, IntPtr, IntPtr> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
IntPtr

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<IntPtr>, IntPtr, ValueFunc<IntPtr, IntPtr, IntPtr>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static IntPtr GetAndAccumulateValue(this Pointer<IntPtr> pointer, IntPtr x, ValueFunc<IntPtr, IntPtr, IntPtr> accumulator)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr x

Accumulator operand.

ValueFunc<IntPtr, IntPtr, IntPtr> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
IntPtr

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Single>, Single, Func<Single, Single, Single>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static float GetAndAccumulateValue(this Pointer<float> pointer, float x, Func<float, float, float> accumulator)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single x

Accumulator operand.

Func<Single, Single, Single> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Single

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndAccumulateValue(Pointer<Single>, Single, ValueFunc<Single, Single, Single>)

Atomically updates the current value referenced by pointer with the results of applying the given function to the current and given values, returning the original value.

Declaration
public static float GetAndAccumulateValue(this Pointer<float> pointer, float x, ValueFunc<float, float, float> accumulator)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single x

Accumulator operand.

ValueFunc<Single, Single, Single> accumulator

A side-effect-free function of two arguments.

Returns
Type Description
Single

The original value.

Remarks

The function is applied with the current value as its first argument, and the given update as the second argument.

| Improve this Doc View Source

GetAndSetValue(Pointer<Double>, Double)

Sets a value located in the memory at the address specified by pointer to a specified value as an atomic operation.

Declaration
public static double GetAndSetValue(this Pointer<double> pointer, double update)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Double update

The value to which the memory is set.

Returns
Type Description
Double

The original value in the memory.

| Improve this Doc View Source

GetAndSetValue(Pointer<Int32>, Int32)

Sets a value located in the memory at the address specified by pointer to a specified value as an atomic operation.

Declaration
public static int GetAndSetValue(this Pointer<int> pointer, int update)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Int32 update

The value to which the memory is set.

Returns
Type Description
Int32

The original value in the memory.

| Improve this Doc View Source

GetAndSetValue(Pointer<Int64>, Int64)

Sets a value located in the memory at the address specified by pointer to a specified value as an atomic operation.

Declaration
public static long GetAndSetValue(this Pointer<long> pointer, long update)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Int64 update

The value to which the memory is set.

Returns
Type Description
Int64

The original value in the memory.

| Improve this Doc View Source

GetAndSetValue(Pointer<IntPtr>, IntPtr)

Sets a value located in the memory at the address specified by pointer to a specified value as an atomic operation.

Declaration
public static IntPtr GetAndSetValue(this Pointer<IntPtr> pointer, IntPtr update)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

IntPtr update

The value to which the memory is set.

Returns
Type Description
IntPtr

The original value that was in the memory before.

| Improve this Doc View Source

GetAndSetValue(Pointer<Single>, Single)

Sets a value located in the memory at the address specified by pointer to a specified value as an atomic operation.

Declaration
public static float GetAndSetValue(this Pointer<float> pointer, float update)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Single update

The value to which the memory is set.

Returns
Type Description
Single

The original value in the memory.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Double>, Func<Double, Double>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static double GetAndUpdateValue(this Pointer<double> pointer, Func<double, double> updater)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Func<Double, Double> updater

A side-effect-free function.

Returns
Type Description
Double

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Double>, ValueFunc<Double, Double>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static double GetAndUpdateValue(this Pointer<double> pointer, ValueFunc<double, double> updater)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

ValueFunc<Double, Double> updater

A side-effect-free function.

Returns
Type Description
Double

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Int32>, Func<Int32, Int32>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static int GetAndUpdateValue(this Pointer<int> pointer, Func<int, int> updater)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Func<Int32, Int32> updater

A side-effect-free function.

Returns
Type Description
Int32

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Int32>, ValueFunc<Int32, Int32>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static int GetAndUpdateValue(this Pointer<int> pointer, ValueFunc<int, int> updater)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

ValueFunc<Int32, Int32> updater

A side-effect-free function.

Returns
Type Description
Int32

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Int64>, Func<Int64, Int64>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static long GetAndUpdateValue(this Pointer<long> pointer, Func<long, long> updater)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Func<Int64, Int64> updater

A side-effect-free function.

Returns
Type Description
Int64

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Int64>, ValueFunc<Int64, Int64>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static long GetAndUpdateValue(this Pointer<long> pointer, ValueFunc<long, long> updater)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

ValueFunc<Int64, Int64> updater

A side-effect-free function.

Returns
Type Description
Int64

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<IntPtr>, Func<IntPtr, IntPtr>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static IntPtr GetAndUpdateValue(this Pointer<IntPtr> pointer, Func<IntPtr, IntPtr> updater)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

Func<IntPtr, IntPtr> updater

A side-effect-free function.

Returns
Type Description
IntPtr

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<IntPtr>, ValueFunc<IntPtr, IntPtr>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static IntPtr GetAndUpdateValue(this Pointer<IntPtr> pointer, ValueFunc<IntPtr, IntPtr> updater)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

ValueFunc<IntPtr, IntPtr> updater

A side-effect-free function.

Returns
Type Description
IntPtr

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Single>, Func<Single, Single>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static float GetAndUpdateValue(this Pointer<float> pointer, Func<float, float> updater)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Func<Single, Single> updater

A side-effect-free function.

Returns
Type Description
Single

The original value.

| Improve this Doc View Source

GetAndUpdateValue(Pointer<Single>, ValueFunc<Single, Single>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the original value.

Declaration
public static float GetAndUpdateValue(this Pointer<float> pointer, ValueFunc<float, float> updater)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

ValueFunc<Single, Single> updater

A side-effect-free function.

Returns
Type Description
Single

The original value.

| Improve this Doc View Source

IncrementValue(Pointer<Double>)

Increments a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static double IncrementValue(this Pointer<double> pointer)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be incremented.

Returns
Type Description
Double

The incremented value.

| Improve this Doc View Source

IncrementValue(Pointer<Int32>)

Increments a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static int IncrementValue(this Pointer<int> pointer)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be incremented.

Returns
Type Description
Int32

The incremented value.

| Improve this Doc View Source

IncrementValue(Pointer<Int64>)

Increments a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static long IncrementValue(this Pointer<long> pointer)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be incremented.

Returns
Type Description
Int64

The incremented value.

| Improve this Doc View Source

IncrementValue(Pointer<IntPtr>)

Increments a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static IntPtr IncrementValue(this Pointer<IntPtr> pointer)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be incremented.

Returns
Type Description
IntPtr

The incremented value.

| Improve this Doc View Source

IncrementValue(Pointer<Single>)

Increments a value located in the memory at the address specified by pointer and stores the result, as an atomic operation.

Declaration
public static float IncrementValue(this Pointer<float> pointer)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be incremented.

Returns
Type Description
Single

The incremented value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Double>, Func<Double, Double>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static double UpdateAndGetValue(this Pointer<double> pointer, Func<double, double> updater)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

Func<Double, Double> updater

A side-effect-free function.

Returns
Type Description
Double

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Double>, ValueFunc<Double, Double>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static double UpdateAndGetValue(this Pointer<double> pointer, ValueFunc<double, double> updater)
Parameters
Type Name Description
Pointer<Double> pointer

A pointer to a value to be modified.

ValueFunc<Double, Double> updater

A side-effect-free function.

Returns
Type Description
Double

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Int32>, Func<Int32, Int32>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static int UpdateAndGetValue(this Pointer<int> pointer, Func<int, int> updater)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

Func<Int32, Int32> updater

A side-effect-free function.

Returns
Type Description
Int32

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Int32>, ValueFunc<Int32, Int32>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static int UpdateAndGetValue(this Pointer<int> pointer, ValueFunc<int, int> updater)
Parameters
Type Name Description
Pointer<Int32> pointer

A pointer to a value to be modified.

ValueFunc<Int32, Int32> updater

A side-effect-free function.

Returns
Type Description
Int32

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Int64>, Func<Int64, Int64>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static long UpdateAndGetValue(this Pointer<long> pointer, Func<long, long> updater)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

Func<Int64, Int64> updater

A side-effect-free function.

Returns
Type Description
Int64

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Int64>, ValueFunc<Int64, Int64>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static long UpdateAndGetValue(this Pointer<long> pointer, ValueFunc<long, long> updater)
Parameters
Type Name Description
Pointer<Int64> pointer

A pointer to a value to be modified.

ValueFunc<Int64, Int64> updater

A side-effect-free function.

Returns
Type Description
Int64

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<IntPtr>, Func<IntPtr, IntPtr>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static IntPtr UpdateAndGetValue(this Pointer<IntPtr> pointer, Func<IntPtr, IntPtr> updater)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

Func<IntPtr, IntPtr> updater

A side-effect-free function.

Returns
Type Description
IntPtr

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<IntPtr>, ValueFunc<IntPtr, IntPtr>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static IntPtr UpdateAndGetValue(this Pointer<IntPtr> pointer, ValueFunc<IntPtr, IntPtr> updater)
Parameters
Type Name Description
Pointer<IntPtr> pointer

A pointer to a value to be modified.

ValueFunc<IntPtr, IntPtr> updater

A side-effect-free function.

Returns
Type Description
IntPtr

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Single>, Func<Single, Single>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static float UpdateAndGetValue(this Pointer<float> pointer, Func<float, float> updater)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

Func<Single, Single> updater

A side-effect-free function.

Returns
Type Description
Single

The updated value.

| Improve this Doc View Source

UpdateAndGetValue(Pointer<Single>, ValueFunc<Single, Single>)

Atomically updates the value referenced by pointer with the results of applying the given function, returning the updated value.

Declaration
public static float UpdateAndGetValue(this Pointer<float> pointer, ValueFunc<float, float> updater)
Parameters
Type Name Description
Pointer<Single> pointer

A pointer to a value to be modified.

ValueFunc<Single, Single> updater

A side-effect-free function.

Returns
Type Description
Single

The updated value.

| Improve this Doc View Source

VolatileRead(Pointer<Boolean>)

Reads the value from the memory location identified by the pointer.

Declaration
public static bool VolatileRead(this Pointer<bool> pointer)
Parameters
Type Name Description
Pointer<Boolean> pointer

The pointer to read.

Returns
Type Description
Boolean

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<Byte>)

Reads the value from the memory location identified by the pointer.

Declaration
public static byte VolatileRead(this Pointer<byte> pointer)
Parameters
Type Name Description
Pointer<Byte> pointer

The pointer to read.

Returns
Type Description
Byte

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<Double>)

Reads the value from the memory location identified by the pointer.

Declaration
public static double VolatileRead(this Pointer<double> pointer)
Parameters
Type Name Description
Pointer<Double> pointer

The pointer to read.

Returns
Type Description
Double

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<Int16>)

Reads the value from the memory location identified by the pointer.

Declaration
public static short VolatileRead(this Pointer<short> pointer)
Parameters
Type Name Description
Pointer<Int16> pointer

The pointer to read.

Returns
Type Description
Int16

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<Int32>)

Reads the value from the memory location identified by the pointer.

Declaration
public static int VolatileRead(this Pointer<int> pointer)
Parameters
Type Name Description
Pointer<Int32> pointer

The pointer to read.

Returns
Type Description
Int32

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<Int64>)

Reads the value from the memory location identified by the pointer.

Declaration
public static long VolatileRead(this Pointer<long> pointer)
Parameters
Type Name Description
Pointer<Int64> pointer

The pointer to read.

Returns
Type Description
Int64

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<IntPtr>)

Reads the value from the memory location identified by the pointer.

Declaration
public static IntPtr VolatileRead(this Pointer<IntPtr> pointer)
Parameters
Type Name Description
Pointer<IntPtr> pointer

The pointer to read.

Returns
Type Description
IntPtr

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<SByte>)

Reads the value from the memory location identified by the pointer.

Declaration
[CLSCompliant(false)]
public static sbyte VolatileRead(this Pointer<sbyte> pointer)
Parameters
Type Name Description
Pointer<SByte> pointer

The pointer to read.

Returns
Type Description
SByte

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<Single>)

Reads the value from the memory location identified by the pointer.

Declaration
public static float VolatileRead(this Pointer<float> pointer)
Parameters
Type Name Description
Pointer<Single> pointer

The pointer to read.

Returns
Type Description
Single

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<UInt16>)

Reads the value from the memory location identified by the pointer.

Declaration
[CLSCompliant(false)]
public static ushort VolatileRead(this Pointer<ushort> pointer)
Parameters
Type Name Description
Pointer<UInt16> pointer

The pointer to read.

Returns
Type Description
UInt16

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<UInt32>)

Reads the value from the memory location identified by the pointer.

Declaration
[CLSCompliant(false)]
public static uint VolatileRead(this Pointer<uint> pointer)
Parameters
Type Name Description
Pointer<UInt32> pointer

The pointer to read.

Returns
Type Description
UInt32

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<UInt64>)

Reads the value from the memory location identified by the pointer.

Declaration
[CLSCompliant(false)]
public static ulong VolatileRead(this Pointer<ulong> pointer)
Parameters
Type Name Description
Pointer<UInt64> pointer

The pointer to read.

Returns
Type Description
UInt64

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileRead(Pointer<UIntPtr>)

Reads the value from the memory location identified by the pointer.

Declaration
[CLSCompliant(false)]
public static UIntPtr VolatileRead(this Pointer<UIntPtr> pointer)
Parameters
Type Name Description
Pointer<UIntPtr> pointer

The pointer to read.

Returns
Type Description
UIntPtr

The value that was read. This value is the latest written by any processor in the computer, regardless of the number of processors or the state of processor cache.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<Boolean>, Boolean)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<bool> pointer, bool value)
Parameters
Type Name Description
Pointer<Boolean> pointer

The pointer to write.

Boolean value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<Byte>, Byte)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<byte> pointer, byte value)
Parameters
Type Name Description
Pointer<Byte> pointer

The pointer to write.

Byte value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<Double>, Double)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<double> pointer, double value)
Parameters
Type Name Description
Pointer<Double> pointer

The pointer to write.

Double value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<Int16>, Int16)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<short> pointer, short value)
Parameters
Type Name Description
Pointer<Int16> pointer

The pointer to write.

Int16 value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<Int32>, Int32)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<int> pointer, int value)
Parameters
Type Name Description
Pointer<Int32> pointer

The pointer to write.

Int32 value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<Int64>, Int64)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<long> pointer, long value)
Parameters
Type Name Description
Pointer<Int64> pointer

The pointer to write.

Int64 value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<IntPtr>, IntPtr)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<IntPtr> pointer, IntPtr value)
Parameters
Type Name Description
Pointer<IntPtr> pointer

The pointer to write.

IntPtr value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<SByte>, SByte)

Writes a value to the memory location identified by the pointer .

Declaration
[CLSCompliant(false)]
public static void VolatileWrite(this Pointer<sbyte> pointer, sbyte value)
Parameters
Type Name Description
Pointer<SByte> pointer

The pointer to write.

SByte value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<Single>, Single)

Writes a value to the memory location identified by the pointer .

Declaration
public static void VolatileWrite(this Pointer<float> pointer, float value)
Parameters
Type Name Description
Pointer<Single> pointer

The pointer to write.

Single value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<UInt16>, UInt16)

Writes a value to the memory location identified by the pointer .

Declaration
[CLSCompliant(false)]
public static void VolatileWrite(this Pointer<ushort> pointer, ushort value)
Parameters
Type Name Description
Pointer<UInt16> pointer

The pointer to write.

UInt16 value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<UInt32>, UInt32)

Writes a value to the memory location identified by the pointer .

Declaration
[CLSCompliant(false)]
public static void VolatileWrite(this Pointer<uint> pointer, uint value)
Parameters
Type Name Description
Pointer<UInt32> pointer

The pointer to write.

UInt32 value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<UInt64>, UInt64)

Writes a value to the memory location identified by the pointer .

Declaration
[CLSCompliant(false)]
public static void VolatileWrite(this Pointer<ulong> pointer, ulong value)
Parameters
Type Name Description
Pointer<UInt64> pointer

The pointer to write.

UInt64 value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

| Improve this Doc View Source

VolatileWrite(Pointer<UIntPtr>, UIntPtr)

Writes a value to the memory location identified by the pointer .

Declaration
[CLSCompliant(false)]
public static void VolatileWrite(this Pointer<UIntPtr> pointer, UIntPtr value)
Parameters
Type Name Description
Pointer<UIntPtr> pointer

The pointer to write.

UIntPtr value

The value to write. The value is written immediately so that it is visible to all processors in the computer.

Remarks

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.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX