Skip to content

Commit 3941a77

Browse files
author
James Munns
committed
Address review comments from @japaric
1 parent 9fd0073 commit 3941a77

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ And don't forget to check our [Awesome Embedded Rust][aer] list! The thing you a
3636

3737
### Background
3838

39-
Currently, it is not convenient to share data with an interrupt using safe Rust. Because interrupt handlers are functions that take no arguments, all data consumed by interrupts must either be local `static` variables, or global `static` variables.
39+
Currently, it is not convenient to share non-atomic data with an interrupt using safe Rust. Because interrupt handlers are functions that take no arguments, all data consumed by interrupts must either be Atomic (e.g. `AtomicBool`), local `static` variables, or global or module scoped `static` variables.
4040

4141
Global variables are not great in Rust, because:
4242

4343
* All mutable access must be `unsafe`
44-
* Not all data can be initialized in a `const` context, so it's often necessary to use an `Option<T>`
44+
* Not all data can be initialized in a `const` context, so it's often necessary to use an `Option<T>` to delay the initialization at runtime
4545
* Global variables aren't typically idiomatic Rust.
4646

47-
Tools like [cortex-m-rtfm] achieve this in a zero cost fashion by using a Domain Specific Language to automatically provide safe access to shared resources between tasks and interrupts, however these tools can not be used by applications not using RTFM, or by libraries such as HAL or BSP crates.
47+
Frameworks like [cortex-m-rtfm] achieve this in a zero cost fashion by using a Domain Specific Language to automatically provide safe access to shared resources between tasks and interrupts, however these tools can not be used by applications not using RTFM, or by libraries such as HAL or BSP crates.
4848

4949
**Useful Links**
5050

0 commit comments

Comments
 (0)