-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #98383 - m-ou-se:remove-memory-order-restrictions, r=…
…joshtriplett Remove restrictions on compare-exchange memory ordering. We currently don't allow the failure memory ordering of compare-exchange operations to be stronger than the success ordering, as was the case in C++11 when its memory model was copied to Rust. However, this restriction was lifted in C++17 as part of [p0418r2](https://wg21.link/p0418r2). It's time we lift the restriction too. | Success | Failure | Before | After | |---------|---------|--------|-------| | Relaxed | Relaxed | ✔️ | ✔️ | | Relaxed | Acquire | ❌ | ✔️ | | Relaxed | SeqCst | ❌ | ✔️ | | Acquire | Relaxed | ✔️ | ✔️ | | Acquire | Acquire | ✔️ | ✔️ | | Acquire | SeqCst | ❌ | ✔️ | | Release | Relaxed | ✔️ | ✔️ | | Release | Acquire | ❌ | ✔️ | | Release | SeqCst | ❌ | ✔️ | | AcqRel | Relaxed | ✔️ | ✔️ | | AcqRel | Acquire | ✔️ | ✔️ | | AcqRel | SeqCst | ❌ | ✔️ | | SeqCst | Relaxed | ✔️ | ✔️ | | SeqCst | Acquire | ✔️ | ✔️ | | SeqCst | SeqCst | ✔️ | ✔️ | | \* | Release | ❌ | ❌ | | \* | AcqRel | ❌ | ❌ | Fixes #68464
- Loading branch information
Showing
1 changed file
with
35 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters