Skip to content

Commit 3e97d8e

Browse files
committed
Comment deviations from the paper
1 parent 6dea99e commit 3e97d8e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/concurrency/weak_memory.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111
//! This implementation is not fully correct under the revised C++20 model and may generate behaviours C++20
1212
//! disallows (<https://github.com/rust-lang/miri/issues/2301>).
1313
//!
14+
//! A modification is made to the paper's model to partially address C++20 changes.
15+
//! Specifically, if an SC load reads from an atomic store of any ordering, then a later SC load cannot read from
16+
//! an earlier store in the location's modification order. This is to prevent creating a backwards S edge from the second
17+
//! load to the first, as a result of C++20's coherence-ordered before rules.
18+
//!
1419
//! Rust follows the C++20 memory model (except for the Consume ordering and some operations not performable through C++'s
1520
//! std::atomic<T> API). It is therefore possible for this implementation to generate behaviours never observable when the
1621
//! same program is compiled and run natively. Unfortunately, no literature exists at the time of writing which proposes

0 commit comments

Comments
 (0)