Mono Class Library: System.Threading.Thread Overview | Members

System.Threading.Thread.VolatileWrite Method

Performs a volatile write to the specified address.

[System.CLSCompliant(false)]
public static void VolatileWrite (ref UIntPtr address, UIntPtr value)

Parameters

address
A reference to a UIntPtr that specifies the address in memory at which to write.
value
A UIntPtr that specifies the value to write.

Remarks

The value is written atomically to the specified address with release semantics, meaning that the write is guaranteed to happen after any references to memory that occur prior to the execution. It is recommended that Thread.VolatileRead and Thread.VolatileWrite be used in conjunction. Calling this method affects only this single access; other accesses to the same location are required to also be made using this method or Thread.VolatileRead if the volatile semantics are to be preserved. This method has exactly the same semantics as using the volatile prefix on the store CIL instruction, except that atomicity is provided for all types, not just those 32 bits or smaller in size.
Note: For additional information, see Partition I of the CLI Specification.

Requirements

Namespace: System.Threading
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0