Skip to content

Commit bb4a782

Browse files
bors[bot]adamgreig
andauthored
Merge #458
458: cortex-m v0.7.7: add documentation for critical-section-single-core r=thejpster a=adamgreig This got missed in #448; this PR copies the documentation added in #451 to the v0.7.x branch. Co-authored-by: Adam Greig <[email protected]>
2 parents 641e419 + 47398cc commit bb4a782

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10+
## [v0.7.7] - 2023-01-03
11+
12+
- Add missing documentation for `critical-section-single-core` feature added
13+
in v0.7.6.
14+
1015
## [v0.7.6] - 2022-08-12
1116

1217
- Added `critical-section-single-core` feature which provides an implementation for the `critical-section` crate for single-core systems, based on disabling all interrupts. (#448)
@@ -750,7 +755,8 @@ fn main() {
750755
- Functions to get the vector table
751756
- Wrappers over miscellaneous instructions like `bkpt`
752757

753-
[Unreleased]: https://github.com/rust-embedded/cortex-m/compare/v0.7.6...HEAD
758+
[Unreleased]: https://github.com/rust-embedded/cortex-m/compare/v0.7.7...HEAD
759+
[v0.7.7]: https://github.com/rust-embedded/cortex-m/compare/v0.7.6...v0.7.7
754760
[v0.7.6]: https://github.com/rust-embedded/cortex-m/compare/v0.7.5...v0.7.6
755761
[v0.7.5]: https://github.com/rust-embedded/cortex-m/compare/v0.7.4...v0.7.5
756762
[v0.7.4]: https://github.com/rust-embedded/cortex-m/compare/v0.7.3...v0.7.4

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0"
1111
name = "cortex-m"
1212
readme = "README.md"
1313
repository = "https://github.com/rust-embedded/cortex-m"
14-
version = "0.7.6"
14+
version = "0.7.7"
1515
edition = "2018"
1616
links = "cortex-m" # prevent multiple versions of this crate to be linked together
1717

src/lib.rs

+10
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@
2525
//! The disadvantage is that `inline-asm` requires a Rust version at least 1.59 to use the `asm!()`
2626
//! macro. In the future 0.8 and above versions of `cortex-m`, this feature will always be enabled.
2727
//!
28+
//! ## `critical-section-single-core`
29+
//!
30+
//! This feature enables a [`critical-section`](https://github.com/rust-embedded/critical-section)
31+
//! implementation suitable for single-core targets, based on disabling interrupts globally.
32+
//!
33+
//! It is **unsound** to enable it on multi-core targets or for code running in unprivileged mode,
34+
//! and may cause functional problems in systems where some interrupts must be not be disabled
35+
//! or critical sections are managed as part of an RTOS. In these cases, you should use
36+
//! a target-specific implementation instead, typically provided by a HAL or RTOS crate.
37+
//!
2838
//! ## `cm7-r0p1`
2939
//!
3040
//! This feature enables workarounds for errata found on Cortex-M7 chips with revision r0p1. Some

0 commit comments

Comments
 (0)