Expand description
Re-export portable atomic.
Although core
contains a
sync::atomic
module,
these are dependent on the target having atomic instructions, and the types are missing
when the platform cannot support them. Zephyr, however, does provide atomics on platforms
that don’t support atomic instructions, using spinlocks. In the Rust-embedded world, this
is done through the portable-atomic
crate,
which will either just re-export the types from core, or provide an implementation using
spinlocks when those aren’t available.
Modules§
- hint
- Re-export of the
core::hint
module.
Macros§
- cfg_
has_ atomic_ 8 - cfg_
has_ atomic_ 16 - cfg_
has_ atomic_ 32 - cfg_
has_ atomic_ 64 - cfg_
has_ atomic_ 128 - cfg_
has_ atomic_ cas - cfg_
has_ atomic_ ptr - cfg_
no_ atomic_ 8 - cfg_
no_ atomic_ 16 - cfg_
no_ atomic_ 32 - cfg_
no_ atomic_ 64 - cfg_
no_ atomic_ 128 - cfg_
no_ atomic_ cas - cfg_
no_ atomic_ ptr
Structs§
- Atomic
Bool - A boolean type which can be safely shared between threads.
- Atomic
I8 - An integer type which can be safely shared between threads.
- Atomic
I16 - An integer type which can be safely shared between threads.
- Atomic
I32 - An integer type which can be safely shared between threads.
- Atomic
I64 - An integer type which can be safely shared between threads.
- Atomic
I128 - An integer type which can be safely shared between threads.
- Atomic
Isize - An integer type which can be safely shared between threads.
- Atomic
Ptr - A raw pointer type which can be safely shared between threads.
- Atomic
U8 - An integer type which can be safely shared between threads.
- Atomic
U16 - An integer type which can be safely shared between threads.
- Atomic
U32 - An integer type which can be safely shared between threads.
- Atomic
U64 - An integer type which can be safely shared between threads.
- Atomic
U128 - An integer type which can be safely shared between threads.
- Atomic
Usize - An integer type which can be safely shared between threads.
Enums§
- Ordering
- Atomic memory orderings
Functions§
- compiler_
fence - A “compiler-only” atomic fence.
- fence
- An atomic fence.