aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
authorGravatar Dario Nieuwenhuis <dirbaio@dirbaio.net> 2022-08-11 01:49:33 +0200
committerGravatar Dario Nieuwenhuis <dirbaio@dirbaio.net> 2022-08-11 23:31:08 +0200
commit3a15a6b4b320fa328e8ab99c31f81536960dd280 (patch)
tree4c3ef55e91988845873479460e438afea445c919 /src/macros.rs
parent4e908625204a1e95dd3fd5bdcd8d66d6bc11c3bc (diff)
downloadcortex-m-3a15a6b4b320fa328e8ab99c31f81536960dd280.tar.gz
cortex-m-3a15a6b4b320fa328e8ab99c31f81536960dd280.tar.zst
cortex-m-3a15a6b4b320fa328e8ab99c31f81536960dd280.zip
Add implementation for critical-section 1.0
Co-Authored-By: Markus Reiter <me@reitermark.us>
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs2
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`...