Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: Bring in portable atomic as a dependency
Direct dependency: so this will need to get vendored. Portable atomic provides an implementation of atomic operations that can use compiler intrinsics when those are available, and has fallbacks when not. This, specifically, allows atomics to be used on the Cortex-M-{0,0+,3} where there are no atomic instructions. We will enable the crticial section implementation, which will result in a Zephyr spinlock being used to mask interrupts. Zephyr already has directives to catch the case of SMP and CPUs that don't have atomic instructions. The RP2040 has a special device to support this, but that will have to be implemented in a general sense, not really related to rust support. Signed-off-by: David Brown <[email protected]>
- Loading branch information