Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 592d98c

Browse files
Merge pull request #3303 from thaven/cas-doc-fix
Fix documentation of cas
2 parents 5a6b41f + 84a8e73 commit 592d98c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/core/atomic.d

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,10 +267,11 @@ in (atomicPtrIsProperlyAligned(here), "Argument `here` is not properly aligned")
267267
* Performs either compare-and-set or compare-and-swap (or exchange).
268268
*
269269
* There are two categories of overloads in this template:
270-
* the first one does a simple compare-and-set, and returns a boolean if the
271-
* operation happened. The value this is written (`writeThis`) can be an rvalue.
272-
* the second category does a compare-and-swap, or compare-and-exchange,
273-
* and expects `writeThis` to be a pointer type, where the previous value
270+
* The first category does a simple compare-and-set.
271+
* The comparison value (`ifThis`) is treated as an rvalue.
272+
*
273+
* The second category does a compare-and-swap (a.k.a. compare-and-exchange),
274+
* and expects `ifThis` to be a pointer type, where the previous value
274275
* of `here` will be written.
275276
*
276277
* This operation is both lock-free and atomic.

0 commit comments

Comments
 (0)