diff options
author | 2022-08-12 00:34:12 +0000 | |
---|---|---|
committer | 2022-08-12 00:34:12 +0000 | |
commit | 0e530549de322684c50e858c6bb985afb5479dbe (patch) | |
tree | 21efc15cdadf74ac03a2e210f15eff1542f33e82 /src/macros.rs | |
parent | e46e2310adc86a5a09a1858a23ecdde2a2c6963f (diff) | |
parent | 3a15a6b4b320fa328e8ab99c31f81536960dd280 (diff) | |
download | cortex-m-0e530549de322684c50e858c6bb985afb5479dbe.tar.gz cortex-m-0e530549de322684c50e858c6bb985afb5479dbe.tar.zst cortex-m-0e530549de322684c50e858c6bb985afb5479dbe.zip |
Merge #447
447: Add implementation for critical-section 1.0 r=adamgreig a=Dirbaio
Picking up #433 since it seems stalled. Changes from #433 are:
- Update to `critical-section 1.0.0-alpha.2`
- Use `bool` restore token
- Name Cargo feature `critical-section-single-core`.
TODO before merging:
- [x] Wait for `critical-section 1.0` release https://github.com/rust-embedded/critical-section/pull/19
Co-Authored-By: Markus Reiter `@reitermarkus`
Co-authored-by: Dario Nieuwenhuis <dirbaio@dirbaio.net>
Diffstat (limited to '')
-rw-r--r-- | src/macros.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/macros.rs b/src/macros.rs index 512c932..21bf78b 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -62,7 +62,7 @@ macro_rules! iprintln { #[macro_export] macro_rules! singleton { ($name:ident: $ty:ty = $expr:expr) => { - $crate::interrupt::free(|_| { + $crate::critical_section::with(|_| { // this is a tuple of a MaybeUninit and a bool because using an Option here is // problematic: Due to niche-optimization, an Option could end up producing a non-zero // initializer value which would move the entire static from `.bss` into `.data`... |