C++ Logo

std-discussion

Advanced search

Re: Data races

From: Vladimir Grigoriev <vlad.moscow_at_[hidden]>
Date: Tue, 07 Mar 2023 14:02:46 +0300
But in the paragraph #10 there is written that
 
10 An evaluation A happens before an evaluation B (or, equivalently, B happens after A) if:
(10.1) — A is sequenced before B, or
(10.2) — A inter-thread happens before B.
 
does not it already mean that «A shall be earlier than B»?
 
With best regards
(Vlad from Moscow)
 
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com
 
 
>Вторник, 7 марта 2023, 1:31 +03:00 от Jason McKesson via Std-Discussion <std-discussion_at_[hidden]>:
>
>On Mon, Mar 6, 2023 at 3:40PM Vladimir Grigoriev via Std-Discussion
>< std-discussion_at_[hidden] > wrote:
>>
>> In the paragraph #15 of section 6.9.2.2 Data races of the C++20 Standard there is written
>>
>> «15 If an operation A that modifies an atomic object M happens before an operation B that modifies M, then A shall be earlier than B in the modification order of M.»
>>
>> Is not it just a tautology?
>That's only because you're assuming what "happens before" means based
>on the literal words. Previously, the standard explained under what
>circumstances "happens before" takes place. This sentence explains
>what "happens before" actually *does*.
>
>Until this sentence, the atomic "modification order" has been a
>concept wholly separate from "happens before". This sentence connects
>them.
>--
>Std-Discussion mailing list
>Std-Discussion_at_[hidden]
>https://lists.isocpp.org/mailman/listinfo.cgi/std-discussion
 

Received on 2023-03-07 11:03:02