New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[intro.races] CWG 2297, LWG 2506: Unclear specification of atomic operations #1611
Comments
I'm not seeing where we normatively say "new and delete are defined to be synchronization operations". |
This is slightly confused. Since the standard does not define operations other than those in [atomics] to be "atomic operations", and furthermore we usually use "operation on atomic object M" when talking about ordering in [intro.races], there seems to be no leeway for a hostile interpretation.
A conforming implementation could make all accesses atomic, but a portable user program may only rely on atomic operations specified as such in the standard. If there is any doubt what "atomic operations on atomic objects" are, it seems [intro.races] is not the place to fix it, but instead this should be addressed in [atomics]. |
Fixes cplusplus#1611 and CWG 2297.
Maybe it's referring to the last sentence of [new.delete.dataraces]? |
@timsong-cpp: That still doesn't say that new/delete are synchronization operations; those make unrelated memory updates visible to other threads. In contrast, for new/delete we just specify that they are serializable as individual function calls, but we don't say anything about visibility of unrelated memory updates. (I'm not positive [new.delete.dataraces] actually says what it should say; we certainly want to allow thread-optimized allocators that respond to some allocations entirely locally without coordinating with other threads. See LWG 2508 for the opposite viewpoint; to be discussed.) |
The "happens before" part almost does that (but for consume operations). |
@timsong-cpp: Fine, but I think that direction is misguided to start with. See http://lists.isocpp.org/parallel/2017/04/0856.php for discussion. |
@jensmaurer I can't see what I can't access :) Was just trying to point out what IMO that portion of the comment probably meant, but I think this is getting a bit off-topic... |
Fixes cplusplus#1611 and CWG 2297.
Fixes cplusplus#1611 and CWG 2297.
Fixes cplusplus#1611 and CWG 2297.
This is covered by LWG 2506. |
SG1 discussion on LWG 2506 asked for a paper to address "atomic object", "atomic operation", "synchronization operation" etc. |
CWG telecon 2017-04-10 determined this issue was editorial.
The text was updated successfully, but these errors were encountered: