5.7 KiB
Changelog
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.
Unreleased
No unreleased changes yet
v1.2.0 - 2024-10-16
- Soundness fix: ensure the
CriticalSectiontoken is notSendorSync, so that it can only be used in the thread that acquired it. #55 - Soundness fix: Fix aliasing
&mutin thestdimplementation. #46 - Fix build with
restore-state-usize. #50
v1.1.3 - 2024-08-22
- Added option to use a
usizesized restore state
v1.1.2 - 2023-08-09
- Clarified that
acquire()must provide ordering guarantees - Updated atomic-polyfill reference to point to portable-atomic instead
- Improved documentation for
Mutexexample - Added list of some known implementations
v1.1.1 - 2022-09-13
- On the
stdimplementation, panicking inside thecritical_section::with()closure no longer accidentally leaves the critical section locked (#26).
v1.1.0 - 2022-08-17
- Added built-in critical section implementation using
std::sync::Mutex, enabled by thestdCargo feature. - MSRV changed to
1.54whenstdfeature is disabled,1.63when enabled.
v1.0.0 - 2022-08-10
- Improved docs.
v1.0.0-alpha.2 - 2022-07-28
- Change name of the
extern fns to avoid clash with critical-section 0.2.
v1.0.0-alpha.1 - 2022-07-28
Breaking changes:
- Removed all builtin impls. These are going to be provided by platform-support crates now.
- Renamed
custom_impl!toset_impl!. - RestoreState is now an opaque struct for the user, and a transparent
RawRestoreStatetype alias for impl writers. - RestoreState type is now configurable with Cargo features. Default is
(). (previously it was fixed tou8.) - Added own
CriticalSectionandMutextypes, instead of reexporting them frombare_metal.
v0.2.8 - 2022-11-29
- Implemented critical-section by forwarding to version 1.1.1
Breaking changes:
acquireandreleaseare only implemented if the restore-state used by version 1.1.1 is an u8 or smaller.- No default critical-section implementation is provided.
Those breaking changes are necessary because versions <= 0.2.7 were unsound, and that was impossible to fix without a breaking change.
This version is meant to minimize that breaking change. However, all users are encouraged to upgrade to critical-section 1.1.
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-sectiondependency toCargo.tomlenabling thestdfeature.[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.0implementation available. Otherwise, provide your own.
v0.2.7 - 2022-04-08
- Add support for AVR targets.
v0.2.6 - 2022-04-02
- Improved docs.
v0.2.5 - 2021-11-02
- Fix
stdimplementation to allow reentrant (nested) critical sections. This would previously deadlock.
v0.2.4 - 2021-09-24
- Add support for 32bit RISC-V targets.
v0.2.3 - 2021-09-13
- Use correct
#[vcfg]forwasmtargets.
v0.2.2 - 2021-09-13
- Added support for
wasmtargets.
v0.2.1 - 2021-05-11
- Added critical section implementation for
std, based on a global Mutex.
v0.2.0 - 2021-05-10
- Breaking change: use
CriticalSection<'_>instead of&CriticalSection<'_>
v0.1.0 - 2021-05-10
- First release