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

Commit

Permalink
Fix Issue 20122 - core.atomic.cas discards result on failure
Browse files Browse the repository at this point in the history
Added overloads that return the result.
  • Loading branch information
TurkeyMan committed Aug 13, 2019
1 parent 7387270 commit e7c4a82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/atomic_cas.dd
@@ -0,0 +1,4 @@
Added overloads for `core.atomic.cas` which don't discard their result.

Existing `core.atomic.cas` functions discard the result, which make it impossible to implement certain operations.
A new set of overloads was added which take `ifThis` by pointer and write the result back to the argument.
2 changes: 1 addition & 1 deletion src/core/atomic.d
Expand Up @@ -4,7 +4,7 @@
*
* Copyright: Copyright Sean Kelly 2005 - 2016.
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Authors: Sean Kelly, Alex Rønne Petersen
* Authors: Sean Kelly, Alex Rønne Petersen, Manu Evans
* Source: $(DRUNTIMESRC core/_atomic.d)
*/

Expand Down

0 comments on commit e7c4a82

Please sign in to comment.