Files
rust/library/core/src
Yuki Okushi bf321ece1e Rollup merge of #106856 - vadorovsky:fix-atomic-annotations, r=joshtriplett
core: Support variety of atomic widths in width-agnostic functions

Before this change, the following functions and macros were annotated with `#[cfg(target_has_atomic = "8")]` or
`#[cfg(target_has_atomic_load_store = "8")]`:

* `atomic_int`
* `strongest_failure_ordering`
* `atomic_swap`
* `atomic_add`
* `atomic_sub`
* `atomic_compare_exchange`
* `atomic_compare_exchange_weak`
* `atomic_and`
* `atomic_nand`
* `atomic_or`
* `atomic_xor`
* `atomic_max`
* `atomic_min`
* `atomic_umax`
* `atomic_umin`

However, none of those functions and macros actually depend on 8-bit width and they are needed for all atomic widths (16-bit, 32-bit, 64-bit etc.). Some targets might not support 8-bit atomics (i.e. BPF, if we would enable atomic CAS for it).

This change fixes that by removing the `"8"` argument from annotations, which results in accepting the whole variety of widths.

Fixes #106845
Fixes #106795

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2023-01-27 12:57:54 +09:00
..
2022-10-29 09:23:12 +02:00
2022-12-28 09:18:42 -05:00
2022-12-15 03:55:21 +00:00
2022-12-20 15:01:37 +00:00
2023-01-06 13:20:58 +01:00
2022-12-13 18:08:35 +01:00
2022-12-28 09:18:43 -05:00
2023-01-16 21:26:03 +01:00
2022-11-20 10:28:14 +01:00
2022-05-22 07:18:32 -03:00
2022-09-22 02:12:06 -04:00
2022-12-12 16:22:01 -07:00
2023-01-12 02:28:38 +00:00
2022-12-28 09:18:43 -05:00
2022-11-06 17:21:21 -05:00
2022-11-04 20:06:18 -07:00
2023-01-07 15:44:38 -05:00
2022-12-28 09:18:43 -05:00
2023-01-14 18:26:38 +01:00
2022-11-06 17:11:02 -05:00
2022-11-09 09:52:04 +01:00