Skip to content

Commit 777f07a

Browse files
committed
Document critical-section-single-core feature.
1 parent 25f1f95 commit 777f07a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@
99
//!
1010
//! # Optional features
1111
//!
12+
//! ## `critical-section-single-core`
13+
//!
14+
//! This feature enables a [`critical-section`](https://github.com/rust-embedded/critical-section)
15+
//! implementation suitable for single-core targets, based on disabling interrupts globally.
16+
//!
17+
//! It is **unsound** to enable it on multi-core targets or for code running in unprivileged mode,
18+
//! and may cause functional problems in systems where some interrupts must be not be disabled
19+
//! or critical sections are managed as part of an RTOS. In these cases, you should use
20+
//! a target-specific implementation instead, typically provided by a HAL or RTOS crate.
21+
//!
1222
//! ## `cm7-r0p1`
1323
//!
1424
//! This feature enables workarounds for errata found on Cortex-M7 chips with revision r0p1. Some

0 commit comments

Comments
 (0)