atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance#138398
Conversation
| #[rustc_nounwind] | ||
| pub unsafe fn atomic_max_acqrel<T: Copy>(_dst: *mut T, _src: T) -> T; | ||
| /// Maximum with the current value. | ||
| /// Maximum with the current value using a signed comparison. |
There was a problem hiding this comment.
It seems when "using a signed comparison" was added everywhere, atomic_max_relaxed was forgotten.
|
☔ The latest upstream changes (presumably #138414) made this pull request unmergeable. Please resolve the merge conflicts. |
|
Doesn't seem like a libs review really. r? compiler |
| // memory, which is not valid for either `&` or `&mut`. | ||
|
|
||
| /// Stores a value if the current value is the same as the `old` value. | ||
| /// `T` must be an integer or pointer type. |
There was a problem hiding this comment.
Not relevant for this PR, but I can't help but wonder if macros could be used to reduce the massive amounts of repetition in this file.
There was a problem hiding this comment.
I think that would make the file harder to read. I'd rather see the atomic intrinsics refactored so that the "ordering" becomes a const generic argument, so that we don't need 5 intrinsics for each individual operation any more.
|
I don't know much about this, but seems reasonable. r=me once the conflicts are resolved. |
…le) what happens with provenance
348d6a8 to
88b206d
Compare
|
@bors r=nnethercote rollup |
Rollup of 16 pull requests Successful merges: - rust-lang#136001 (Overhaul examples for PermissionsExt) - rust-lang#136230 (Reword incorrect documentation about SocketAddr having varying layout) - rust-lang#136892 (Sync Fuchsia target spec with clang Fuchsia driver) - rust-lang#136911 (Add documentation URL to selected jobs) - rust-lang#137870 ( Improve HashMap docs for const and static initializers) - rust-lang#138179 (Add `src/tools/x` to the main workspace) - rust-lang#138389 (use `expect` instead of `allow`) - rust-lang#138396 (Enable metrics and verbose tests in PR CI) - rust-lang#138398 (atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance) - rust-lang#138432 (fix: remove the check of lld not supporting `@response-file)` - rust-lang#138434 (Visit `PatField` when collecting lint levels) - rust-lang#138441 (update error message) - rust-lang#138442 (EUV: fix place of deref pattern's interior's scrutinee) - rust-lang#138457 (Remove usage of legacy scheme paths on RedoxOS) - rust-lang#138461 (Remove an outdated line from a test comment) - rust-lang#138466 (Remove myself from libs review) Failed merges: - rust-lang#138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#138398 - RalfJung:atomic-intrinsics-provenance, r=nnethercote atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance The provenance semantics match what Miri implements and what the `AtomicPtr` API expects.
…nce, r=nnethercote atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance The provenance semantics match what Miri implements and what the `AtomicPtr` API expects.
Rollup of 16 pull requests Successful merges: - rust-lang#136001 (Overhaul examples for PermissionsExt) - rust-lang#136230 (Reword incorrect documentation about SocketAddr having varying layout) - rust-lang#136892 (Sync Fuchsia target spec with clang Fuchsia driver) - rust-lang#136911 (Add documentation URL to selected jobs) - rust-lang#137870 ( Improve HashMap docs for const and static initializers) - rust-lang#138179 (Add `src/tools/x` to the main workspace) - rust-lang#138389 (use `expect` instead of `allow`) - rust-lang#138396 (Enable metrics and verbose tests in PR CI) - rust-lang#138398 (atomic intrinsics: clarify which types are supported and (if applicable) what happens with provenance) - rust-lang#138432 (fix: remove the check of lld not supporting `@response-file)` - rust-lang#138434 (Visit `PatField` when collecting lint levels) - rust-lang#138441 (update error message) - rust-lang#138442 (EUV: fix place of deref pattern's interior's scrutinee) - rust-lang#138457 (Remove usage of legacy scheme paths on RedoxOS) - rust-lang#138461 (Remove an outdated line from a test comment) - rust-lang#138466 (Remove myself from libs review) Failed merges: - rust-lang#138452 (Remove `RUN_CHECK_WITH_PARALLEL_QUERIES`) r? `@ghost` `@rustbot` modify labels: rollup
The provenance semantics match what Miri implements and what the
AtomicPtrAPI expects.