Skip to content

Commit e3a522d

Browse files
Dirbaioadamgreig
andauthored
Apply suggestions from code review
Co-authored-by: Adam Greig <[email protected]>
1 parent b0a2647 commit e3a522d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@
1212
//! ## `critical-section-single-core`
1313
//!
1414
//! This feature enables a [`critical-section`](https://github.com/rust-embedded/critical-section)
15-
//! implementation suitable for single-core targets, based on disabling interrupt globally.
15+
//! implementation suitable for single-core targets, based on disabling interrupts globally.
1616
//!
17-
//! It is **unsound** to enable it on multi-core targets. You should use a target-specific
18-
//! implementation that synchronizes all cores instead, typically provided by the HAL crate.
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.
20+
//! You should use a target-specific implementation instead, typically provided by a HAL crate.
1921
//!
2022
//! ## `cm7-r0p1`
2123
//!

src/macros.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ macro_rules! iprintln {
3232
///
3333
/// # Notes
3434
///
35-
/// This macro requires a `critical-section` implementation to be set. For single core systems, you can
36-
/// enable the `critical-section-single-core` feature for this crate. For multi core systems, you
35+
/// This macro requires a `critical-section` implementation to be set. For most single core systems,
36+
/// you can enable the `critical-section-single-core` feature for this crate. For other systems, you
3737
/// have to provide one from elsewhere, typically your chip's HAL crate.
3838
///
3939
/// For debuggability, you can set an explicit name for a singleton. This name only shows up the

0 commit comments

Comments
 (0)