Bug 15007 – core.atomic match C++11

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-09-03T12:06:11Z
Last change time
2019-08-31T10:37:48Z
Keywords
industry, pull
Assigned to
No Owner
Creator
Manu
See also
https://issues.dlang.org/show_bug.cgi?id=13713

Comments

Comment #0 by turkeyman — 2015-09-03T12:06:11Z
I'm porting some code using C++11 <atomic> which provides std::atomic<T>, and has some useful methods. core.atomic provides the primitives with which these can be created, but I think core.atomic should go one step further and provide the direct parallels to C++'s std::atomic to make porting code fast and painless. The missing functions are: exchange, fetch_***, compare_exchange_weak/strong
Comment #1 by z.p.gaal.devel — 2017-06-14T13:23:11Z
Also plese take a look at this forum post: https://forum.dlang.org/thread/[email protected] What is the state of fences and compiler optimization? Is it guaranteed that, no instruction is moved increctly before/after a fence/atomic operation ?
Comment #2 by z.p.gaal.devel — 2017-06-14T13:29:29Z
Comment #3 by turkeyman — 2019-08-20T06:42:29Z
Comment #4 by dlang-bot — 2019-08-20T07:25:15Z
@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 #5 by dlang-bot — 2019-08-31T10:37:48Z
dlang/druntime pull request #2745 "Renovate core.atomic, improve and simplify the constraints on functions" was merged into master: - 1b139035a32f6aeedcdb8d1589af45e9deb73f88 by Manu Evans: 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, 18643, 15007, 8831 https://github.com/dlang/druntime/pull/2745