All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
No unreleased changes yet
- Crate is deprecated, use
portable-atomic
instead.
- Add MSP430 support.
- Fix
AtomicPtr
accidentally not being available when not polyfilled.
- Update to
critical-section
v1.0
-
Bump
critical-section
dependency from0.2
to1.0
.This is a breaking change if you were relying on the default implementations available on
critical-section 0.2.7
and earlier. They have been removed incritical-section 0.2.8
because they were unsound, since there's no way to guarantee they're correct for the target in use (for example for multi-core embedded targets). Sincecritical-section 0.2.8
just forwards to1.0
now, we decided to changeatomic-polyfill
to use1.0
directly.If you're seeing a linker error like
undefined symbol: _critical_section_1_0_acquire
, you're affected. To fix it:-
If your target supports
std
: Add thecritical-section
dependency toCargo.toml
enabling thestd
feature.[dependencies] critical-section = { version = "1.1", features = ["std"]}
-
For single-core Cortex-M targets in privileged mode:
[dependencies] cortex-m = { version = "0.7.6", features = ["critical-section-single-core"]}
-
For single-hart RISC-V targets in privileged mode:
[dependencies] riscv = { version = "0.10", features = ["critical-section-single-hart"]}
-
For other targets: check if your HAL or architecture-support crate has a
critical-section 1.0
implementation available. Otherwise, provide your own.
-
- Fix
AtomicPtr
accidentally not being available when not polyfilled.
- Switch to only two polyfill levels.
The "CAS" level which uses atomic load/store and critical-section based CAS was not
sound, because critical-section
guarantees only "no other critical section can run concurrently",
not "no other code can run concurrently". Therefore a CS-based CAS can still race a native atomic store.
- Added AVR support.
- Added support for xtensa (ESP chips), with and without ESP-IDF.
- Reexport
core::sync::atomic::*
as-is for unknown targets, to avoid build failures if they don't have full atomic support.
- Add polyfill support for
thumbv4t
targets. (Nintendo Game Boy Advance) - Added
get_mut()
toAtomicBool
. - Added
into_inner()
to all atomics - Added
fmt::Debug
impl toAtomicBool
,AtomicPtr
. - Added
fmt::Pointer
impl toAtomicPtr
. - Added
From<*mut T>
impl toAtomicPtr
. - Added
RefUnwindSafe
impl to all atomics.
- Updated critical-section to v0.2.5. Fixes
std
implementation to allow reentrant (nested) critical sections. This would previously deadlock.
- Added support for RISC-V.
- Added support for "full polyfill" level, where load/stores are polyfilled, not just CAS operations.
- Added support for
AtomicU64
,AtomicI64
.
- Only import
cortex-m
when needed (#4) - Fix panic on
fetch_update
due to incorrect ordering (#5)
- Added missing reexport of
fence
andcompiler_fence
in polyfilled mode.
- Added polyfills for AtomicU8, AtomicU16, AtomicUsize, AtomicI8, AtomicI16, AtomicI32, AtomicIsize
- First release