From 1f8b4f651e15d9b25f2608e4203857d9b69185fd Mon Sep 17 00:00:00 2001 From: Per Lindgren Date: Thu, 11 Mar 2021 18:16:00 +0100 Subject: [PATCH] MONOTONIC storage now RacyCell --- macros/src/codegen/post_init.rs | 2 +- macros/src/codegen/timer_queue.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/macros/src/codegen/post_init.rs b/macros/src/codegen/post_init.rs index eec633ba2b..c95ee7da75 100644 --- a/macros/src/codegen/post_init.rs +++ b/macros/src/codegen/post_init.rs @@ -40,7 +40,7 @@ pub fn codegen(app: &App, analysis: &Analysis) -> Vec { // Store the monotonic let name = util::monotonic_ident(&monotonic.to_string()); let name = util::mark_internal_ident(&name); - stmts.push(quote!(#name = Some(monotonics.#idx);)); + stmts.push(quote!(*#name.get_mut_unchecked() = Some(monotonics.#idx);)); } // Enable the interrupts -- this completes the `init`-ialization phase diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs index 1d2a678e0d..cf9bb3c11b 100644 --- a/macros/src/codegen/timer_queue.rs +++ b/macros/src/codegen/timer_queue.rs @@ -126,7 +126,6 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec