Yuki Okushi
796bc7cae3
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 https://github.com/rust-lang/rust/issues/68464
2022-07-18 08:39:57 +09:00
..
2022-07-16 22:30:54 +02:00
2022-05-20 09:30:26 +02:00
2022-07-18 08:39:57 +09:00
2022-06-03 17:16:41 -04:00
2022-06-09 09:50:26 -07:00
2022-05-27 07:36:17 -04:00
2022-06-28 09:54:29 -04:00
2022-06-03 17:16:41 -04:00
2022-07-17 13:08:51 +09:00
2022-05-10 19:53:22 +02:00
2022-07-09 18:52:37 -04:00
2022-07-01 15:48:23 +02:00