Skip to content

Commit a92bca5

Browse files
jwakelyStefanus Du Toit
authored andcommitted
LWG2130 Missing ordering constraints
1 parent 6b5ce8d commit a92bca5

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

source/atomics.tex

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -289,11 +289,19 @@
289289
\textit{A} or a later modification of \textit{M} in its modification order.
290290

291291
\pnum
292-
For atomic operations \textit{A} and \textit{B} on an atomic object \textit{M}, if there
293-
are \tcode{memory_order_seq_cst} fences \tcode{X} and \tcode{Y} such that \textit{A} is
294-
sequenced before \textit{X}, \textit{Y} is sequenced before \textit{B}, and \textit{X}
295-
precedes \textit{Y} in \textit{S}, then \textit{B} occurs later than \textit{A} in the
296-
modification order of \textit{M}.
292+
For atomic modifications \textit{A} and \textit{B} of an atomic object \textit{M},
293+
\textit{B} occurs later than \textit{A} in the modification order of \textit{M} if:
294+
295+
\begin{itemize}
296+
\item there is a \tcode{memory_order_seq_cst} fence \textit{X} such that \textit{A}
297+
is sequenced before \textit{X}, and \textit{X} precedes \textit{B} in \textit{S}, or
298+
\item there is a \tcode{memory_order_seq_cst} fence \textit{Y} such that \textit{Y}
299+
is sequenced before \textit{B}, and \textit{A} precedes \textit{Y} in \textit{S}, or
300+
\item there are \tcode{memory_order_seq_cst} fences \textit{X} and \textit{Y} such that \textit{A}
301+
is sequenced before \textit{X}, \textit{Y} is sequenced before \textit{B},
302+
and \textit{X} precedes \textit{Y} in \textit{S}.
303+
\end{itemize}
304+
297305

298306
\pnum
299307
\enternote \tcode{memory_order_seq_cst} ensures sequential consistency only for a

0 commit comments

Comments
 (0)