Skip to content

Commit a8a9b8c

Browse files
authored
Clarify CompareExchange behavior (#10181)
* Clarify CompareExchange behavior * Update overload text
1 parent c7792e6 commit a8a9b8c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

xml/System.Threading/Interlocked.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@
507507
<AssemblyVersion>4.1.0.0</AssemblyVersion>
508508
</AssemblyInfo>
509509
<Docs>
510-
<summary>Compares two values for equality and, if they are equal, replaces the first value.</summary>
510+
<summary>Compares two values for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
511511
</Docs>
512512
</MemberGroup>
513513
<Member MemberName="CompareExchange">
@@ -540,7 +540,7 @@
540540
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
541541
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
542542
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
543-
<summary>Compares two 8-bit unsigned integers for equality and, if they are equal, replaces the first value.</summary>
543+
<summary>Compares two 8-bit unsigned integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
544544
<returns>The original value in <paramref name="location1" />.</returns>
545545
<remarks>To be added.</remarks>
546546
<exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a <see langword="null" /> pointer.</exception>
@@ -596,7 +596,7 @@
596596
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
597597
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
598598
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
599-
<summary>Compares two double-precision floating point numbers for equality and, if they are equal, replaces the first value.</summary>
599+
<summary>Compares two double-precision floating point numbers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
600600
<returns>The original value in <paramref name="location1" />.</returns>
601601
<remarks>
602602
<format type="text/markdown"><![CDATA[
@@ -651,7 +651,7 @@
651651
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
652652
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
653653
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
654-
<summary>Compares two 16-bit unsigned integers for equality and, if they are equal, replaces the first value.</summary>
654+
<summary>Compares two 16-bit unsigned integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
655655
<returns>The original value in <paramref name="location1" />.</returns>
656656
<remarks>To be added.</remarks>
657657
<exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a <see langword="null" /> pointer.</exception>
@@ -712,7 +712,7 @@
712712
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
713713
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
714714
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
715-
<summary>Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value.</summary>
715+
<summary>Compares two 32-bit signed integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
716716
<returns>The original value in <paramref name="location1" />.</returns>
717717
<remarks>
718718
<format type="text/markdown"><![CDATA[
@@ -789,7 +789,7 @@
789789
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
790790
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
791791
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
792-
<summary>Compares two 64-bit signed integers for equality and, if they are equal, replaces the first value.</summary>
792+
<summary>Compares two 64-bit signed integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
793793
<returns>The original value in <paramref name="location1" />.</returns>
794794
<remarks>
795795
<format type="text/markdown"><![CDATA[
@@ -858,7 +858,7 @@
858858
<param name="location1">The destination <see cref="T:System.IntPtr" />, whose value is compared with the value of <paramref name="comparand" /> and possibly replaced by <paramref name="value" />.</param>
859859
<param name="value">The <see cref="T:System.IntPtr" /> that replaces the destination value if the comparison results in equality.</param>
860860
<param name="comparand">The <see cref="T:System.IntPtr" /> that is compared to the value at <paramref name="location1" />.</param>
861-
<summary>Compares two platform-specific handles or pointers for equality and, if they are equal, replaces the first one.</summary>
861+
<summary>Compares two platform-specific handles or pointers for equality and, if they are equal, replaces the first one, as an atomic operation.</summary>
862862
<returns>The original value in <paramref name="location1" />.</returns>
863863
<remarks>
864864
<format type="text/markdown"><![CDATA[
@@ -936,7 +936,7 @@
936936
<param name="location1">The destination object that is compared by reference with <paramref name="comparand" /> and possibly replaced.</param>
937937
<param name="value">The object that replaces the destination object if the reference comparison results in equality.</param>
938938
<param name="comparand">The object that is compared by reference to the object at <paramref name="location1" />.</param>
939-
<summary>Compares two objects for reference equality and, if they are equal, replaces the first object.</summary>
939+
<summary>Compares two objects for reference equality and, if they are equal, replaces the first object, as an atomic operation.</summary>
940940
<returns>The original value in <paramref name="location1" />.</returns>
941941
<remarks>
942942
<format type="text/markdown"><![CDATA[
@@ -994,7 +994,7 @@ If `comparand` and the object in `location1` are equal by reference, then `value
994994
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
995995
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
996996
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
997-
<summary>Compares two 8-bit signed integers for equality and, if they are equal, replaces the first value.</summary>
997+
<summary>Compares two 8-bit signed integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
998998
<returns>The original value in <paramref name="location1" />.</returns>
999999
<remarks>To be added.</remarks>
10001000
<exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a <see langword="null" /> pointer.</exception>
@@ -1051,7 +1051,7 @@ If `comparand` and the object in `location1` are equal by reference, then `value
10511051
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
10521052
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
10531053
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
1054-
<summary>Compares two single-precision floating point numbers for equality and, if they are equal, replaces the first value.</summary>
1054+
<summary>Compares two single-precision floating point numbers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
10551055
<returns>The original value in <paramref name="location1" />.</returns>
10561056
<remarks>
10571057
<format type="text/markdown"><![CDATA[
@@ -1112,7 +1112,7 @@ If `comparand` and the object in `location1` are equal by reference, then `value
11121112
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
11131113
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
11141114
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
1115-
<summary>Compares two 16-bit signed integers for equality and, if they are equal, replaces the first value.</summary>
1115+
<summary>Compares two 16-bit signed integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
11161116
<returns>The original value in <paramref name="location1" />.</returns>
11171117
<remarks>To be added.</remarks>
11181118
<exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a <see langword="null" /> pointer.</exception>
@@ -1158,7 +1158,7 @@ If `comparand` and the object in `location1` are equal by reference, then `value
11581158
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
11591159
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
11601160
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
1161-
<summary>Compares two 32-bit unsigned integers for equality and, if they are equal, replaces the first value.</summary>
1161+
<summary>Compares two 32-bit unsigned integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
11621162
<returns>The original value in <paramref name="location1" />.</returns>
11631163
<remarks>To be added.</remarks>
11641164
<exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a <see langword="null" /> pointer.</exception>
@@ -1204,7 +1204,7 @@ If `comparand` and the object in `location1` are equal by reference, then `value
12041204
<param name="location1">The destination, whose value is compared with <paramref name="comparand" /> and possibly replaced.</param>
12051205
<param name="value">The value that replaces the destination value if the comparison results in equality.</param>
12061206
<param name="comparand">The value that is compared to the value at <paramref name="location1" />.</param>
1207-
<summary>Compares two 64-bit unsigned integers for equality and, if they are equal, replaces the first value.</summary>
1207+
<summary>Compares two 64-bit unsigned integers for equality and, if they are equal, replaces the first value, as an atomic operation.</summary>
12081208
<returns>The original value in <paramref name="location1" />.</returns>
12091209
<remarks>To be added.</remarks>
12101210
<exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a <see langword="null" /> pointer.</exception>
@@ -1248,7 +1248,7 @@ If `comparand` and the object in `location1` are equal by reference, then `value
12481248
<param name="location1">The destination <see cref="T:System.UIntPtr" />, whose value is compared with the value of <paramref name="comparand" /> and possibly replaced by <paramref name="value" />.</param>
12491249
<param name="value">The <see cref="T:System.UIntPtr" /> that replaces the destination value if the comparison results in equality.</param>
12501250
<param name="comparand">The <see cref="T:System.UIntPtr" /> that is compared to the value at <paramref name="location1" />.</param>
1251-
<summary>Compares two platform-specific handles or pointers for equality and, if they are equal, replaces the first one.</summary>
1251+
<summary>Compares two platform-specific handles or pointers for equality and, if they are equal, replaces the first one, as an atomic operation.</summary>
12521252
<returns>The original value in <paramref name="location1" />.</returns>
12531253
<remarks>To be added.</remarks>
12541254
<exception cref="T:System.NullReferenceException">The address of <paramref name="location1" /> is a <see langword="null" /> pointer.</exception>
@@ -1326,7 +1326,7 @@ If `comparand` and the object in `location1` are equal by reference, then `value
13261326
<param name="location1">The destination, whose value is compared by reference with <paramref name="comparand" /> and possibly replaced. This is a reference parameter (<see langword="ref" /> in C#, <see langword="ByRef" /> in Visual Basic).</param>
13271327
<param name="value">The value that replaces the destination value if the comparison by reference results in equality.</param>
13281328
<param name="comparand">The value that is compared by reference to the value at <paramref name="location1" />.</param>
1329-
<summary>Compares two instances of the specified reference type <paramref name="T" /> for reference equality and, if they are equal, replaces the first one.</summary>
1329+
<summary>Compares two instances of the specified reference type <paramref name="T" /> for reference equality and, if they are equal, replaces the first one, as an atomic operation.</summary>
13301330
<returns>The original value in <paramref name="location1" />.</returns>
13311331
<remarks>
13321332
<format type="text/markdown"><![CDATA[

0 commit comments

Comments
 (0)