Bug 20105 – core.atomic 'cas' function is incomplete
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-08-04T21:54:09Z
Last change time
2019-08-31T10:37:50Z
Keywords
pull
Assigned to
No Owner
Creator
Manu
Comments
Comment #0 by turkeyman — 2019-08-04T21:54:09Z
core.atomic cas is incomplete
1. It doesn't have a pair of weak and strong complements
2. It doesn't accept memory order arguments
3. It should have memory order variants where just one is supplied, and also an on-success and on-fail variant.
The C++ atomic reference shows the complete set of operations (https://en.cppreference.com/w/cpp/atomic/atomic/compare_exchange)
@TurkeyMan updated dlang/druntime pull request #2745 "Renovate core.atomic, improve and simplify the constraints on functions" fixing this issue:
- Add missing features to the API.
Renovate core.atomic, improve and simplify the constraints on functions.
Most functions are slightly more efficient.
Concentrate more specific work into less surface area.
Fixes issues 20107, 20106, 20105, 18643, 15007, 8831
https://github.com/dlang/druntime/pull/2745
Comment #3 by dlang-bot — 2019-08-31T10:37:50Z
dlang/druntime pull request #2745 "Renovate core.atomic, improve and simplify the constraints on functions" was merged into master:
- 335d84f5bd227b9bbeb6789cd6a60a12e5d02b24 by Manu Evans:
Add MemoryOrder args to cas.
Fixes issue 20105
https://github.com/dlang/druntime/pull/2745