You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Threading/Interlocked.xml
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2950,6 +2950,9 @@ This method wraps a call to [FlushProcessWriteBuffers](/windows/win32/api/proces
2950
2950
## Remarks
2951
2951
The <xref:System.Threading.Interlocked.Read%2A> method is unnecessary on 64-bit systems, because 64-bit read operations are already atomic. On 32-bit systems, 64-bit read operations are not atomic unless performed using <xref:System.Threading.Interlocked.Read%2A>.
2952
2952
2953
+
> [!IMPORTANT]
2954
+
> On 32-bit platforms, despite taking a readonly reference parameter, this method requires write access to the memory location because it uses <xref:System.Threading.Interlocked.CompareExchange%2A> internally to ensure atomicity. Attempting to read from read-only memory (such as memory-mapped files opened with read-only access) can result in an <xref:System.AccessViolationException>.
@@ -3006,7 +3009,17 @@ This method wraps a call to [FlushProcessWriteBuffers](/windows/win32/api/proces
3006
3009
<paramname="location">The 64-bit value to be loaded.</param>
3007
3010
<summary>Returns a 64-bit unsigned value, loaded as an atomic operation.</summary>
3008
3011
<returns>The loaded value.</returns>
3009
-
<remarks>To be added.</remarks>
3012
+
<remarks>
3013
+
<formattype="text/markdown"><![CDATA[
3014
+
3015
+
## Remarks
3016
+
The <xref:System.Threading.Interlocked.Read%2A> method is unnecessary on 64-bit systems, because 64-bit read operations are already atomic. On 32-bit systems, 64-bit read operations are not atomic unless performed using <xref:System.Threading.Interlocked.Read%2A>.
3017
+
3018
+
> [!IMPORTANT]
3019
+
> On 32-bit platforms, despite taking a readonly reference parameter, this method requires write access to the memory location because it uses <xref:System.Threading.Interlocked.CompareExchange%2A> internally to ensure atomicity. Attempting to read from read-only memory (such as memory-mapped files opened with read-only access) can result in an <xref:System.AccessViolationException>.
0 commit comments