File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 4444//! The most important aspect of this model is that *data races* are undefined behavior. A data race
4545//! is defined as conflicting non-synchronized accesses where at least one of the accesses is
4646//! non-atomic. Here, accesses are *conflicting* if they affect overlapping regions of memory and at
47- //! least one of them is a write. They are *non-synchronized* if neither of them *happens-before*
48- //! the other, according to the happens-before order of the memory model.
47+ //! least one of them is a write. (A `compare_exchange` or `compare_exchange_weak` that does not
48+ //! succeed is not considered a write.) They are *non-synchronized* if neither of them
49+ //! *happens-before* the other, according to the happens-before order of the memory model.
4950//!
5051//! The other possible cause of undefined behavior in the memory model are mixed-size accesses: Rust
5152//! inherits the C++ limitation that non-synchronized conflicting atomic accesses may not partially
You can’t perform that action at this time.
0 commit comments