aboutsummaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
authorGravatar Per Lindgren <per.lindgren@ltu.se> 2021-03-11 18:16:00 +0100
committerGravatar Per Lindgren <per.lindgren@ltu.se> 2021-03-11 18:16:00 +0100
commit1f8b4f651e15d9b25f2608e4203857d9b69185fd (patch)
tree5d76e84ecdc29ee577303d0635ddbbe492feabf2 /macros/src
parent1769a83fadea93f89d6d22c5703f35e8f2288795 (diff)
downloadrtic-1f8b4f651e15d9b25f2608e4203857d9b69185fd.tar.gz
rtic-1f8b4f651e15d9b25f2608e4203857d9b69185fd.tar.zst
rtic-1f8b4f651e15d9b25f2608e4203857d9b69185fd.zip
MONOTONIC storage now RacyCell
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/codegen/post_init.rs2
-rw-r--r--macros/src/codegen/timer_queue.rs1
2 files changed, 1 insertions, 2 deletions
diff --git a/macros/src/codegen/post_init.rs b/macros/src/codegen/post_init.rs
index eec633ba..c95ee7da 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<TokenStream2> {
// 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 1d2a678e..cf9bb3c1 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<TokenStrea
#[no_mangle]
#[allow(non_snake_case)]
unsafe fn #bound_interrupt() {
-
while let Some((task, index)) = rtic::export::interrupt::free(|_|
if let Some(mono) = #app_path::#m_ident.get_mut_unchecked().as_mut() {
#tq.get_mut_unchecked().dequeue(|| #disable_isr, mono)