Expand description
A collection of atomic “polyfill” routines, to use a term from JavaScript.
ARMv6-M processors like the Cortex-M0 don’t support the fancier atomic operations available on most other ARM processors. In particular, they have no atomic swap or read-modify-write instructions. This module provides traits that use the native atomics on M3 and later, and fallback implementations on M0.
The M0 implementations rely on disabling interrupts. This means that:
-
They will hurt interrupt latency/jitter. However, the M0 already has pretty poor interrupt latency/jitter because of uninterruptible instructions and lack of BASEPRI. So, not a big loss.
-
They don’t work in unprivileged mode. But, neither does most of
lilos.
This is exposed so that applications don’t have to rewrite it for M0 support.
Traits§
- Atomic
Arith Ext Deprecated - Atomic operations that apply to arithmetic types.
- Atomic
Ext Deprecated - Basic atomic operations.