rust/library/core
Amanieu d'Antras 3dbee5bc71 Optimize AtomicBool for target that don't support byte-sized atomics
`AtomicBool` is defined to have the same layout as `bool`, which means
that we guarantee that it has a size of 1 byte. However on certain
architectures such as RISC-V, LLVM will emulate byte atomics using a
masked CAS loop on an aligned word.

We can take advantage of the fact that `bool` only ever has a value of 0
or 1 to replace `swap` operations with `and`/`or` operations that LLVM
can lower to word-sized atomic `and`/`or` operations. This takes
advantage of the fact that the incoming value to a `swap` or
`compare_exchange` for `AtomicBool` is often a compile-time constant.
2023-07-26 00:09:49 +01:00
..
benches Specialize StepBy<Range<{integer}>> 2023-06-23 00:17:34 +02:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Optimize AtomicBool for target that don't support byte-sized atomics 2023-07-26 00:09:49 +01:00
tests enable test_join test in Miri 2023-07-03 14:05:55 +02:00
Cargo.toml Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00