Skip to content

Commit 37c3a55

Browse files
jensmaurerzygoloid
authored andcommitted
P0982R1 Weaken Release Sequences
1 parent 05acef7 commit 37c3a55

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

source/basic.tex

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5069,17 +5069,13 @@
50695069
\end{note}
50705070

50715071
\pnum
5072-
A \defn{release sequence} headed by a release operation \placeholder{A} on an atomic object
5073-
\placeholder{M} is a maximal contiguous sub-sequence of
5072+
A \defn{release sequence} headed
5073+
by a release operation \placeholder{A} on an atomic object \placeholder{M}
5074+
is a maximal contiguous sub-sequence of
50745075
\indextext{side effects}%
5075-
side effects in the
5076-
modification order of \placeholder{M}, where the first operation is \tcode{A}, and
5077-
every subsequent operation
5078-
5079-
\begin{itemize}
5080-
\item is performed by the same thread that performed \tcode{A}, or
5081-
\item is an atomic read-modify-write operation.
5082-
\end{itemize}
5076+
side effects in the modification order of \placeholder{M},
5077+
where the first operation is \placeholder{A}, and
5078+
every subsequent operation is an atomic read-modify-write operation.
50835079

50845080
\pnum
50855081
Certain library calls \defn{synchronize with} other library calls performed by

source/compatibility.tex

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,6 +1815,18 @@
18151815
}
18161816
\end{codeblock}
18171817

1818+
\rSec2[diff.cpp17.basic]{\ref{basic}: basics}
1819+
1820+
\diffref{intro.races}
1821+
\change Except for the initial release operation,
1822+
a release sequence consists solely of atomic read-modify-write operations.
1823+
\rationale Removal of rarely used and confusing feature.
1824+
\effect If a \tcode{memory_order_release} atomic store is followed
1825+
by a \tcode{memory_order_relaxed} store to the same variable by the same thread,
1826+
then reading the latter value with a \tcode{memory_order_acquire} load
1827+
no longer provides any ``happens before'' guarantees,
1828+
even in the absence of intervening stores by another thread.
1829+
18181830
\rSec2[diff.cpp17.expr]{\ref{expr}: expressions}
18191831

18201832
\diffref{expr.prim.lambda.capture}

0 commit comments

Comments
 (0)