aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/timer_queue.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2021-05-27 16:18:46 +0000
committerGravatar GitHub <noreply@github.com> 2021-05-27 16:18:46 +0000
commit0b0bb1bfa9de42e951f538b8f43bfcc53709a241 (patch)
tree8d83566481df0925920b703e63dc310b87c39bb9 /macros/src/codegen/timer_queue.rs
parentaad8f81991c3495f225df80d7c8456faecd40728 (diff)
parentc17348d2904b60713e1914567ba5566134165103 (diff)
downloadrtic-0b0bb1bfa9de42e951f538b8f43bfcc53709a241.tar.gz
rtic-0b0bb1bfa9de42e951f538b8f43bfcc53709a241.tar.zst
rtic-0b0bb1bfa9de42e951f538b8f43bfcc53709a241.zip
Merge #485v0.6.0-alpha.4
485: New codegen structure to eliminate issues with paths r=korken89 a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'macros/src/codegen/timer_queue.rs')
-rw-r--r--macros/src/codegen/timer_queue.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs
index 14e91054..9e30d100 100644
--- a/macros/src/codegen/timer_queue.rs
+++ b/macros/src/codegen/timer_queue.rs
@@ -57,8 +57,6 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
let mono_type = &monotonic.ty;
let m_ident = util::monotonic_ident(&monotonic_name);
let m_ident = util::mark_internal_ident(&m_ident);
- let app_name = &app.name;
- let app_path = quote! {crate::#app_name};
// Static variables and resource proxy
{
@@ -139,7 +137,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
#[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() {
+ if let Some(mono) = #m_ident.get_mut_unchecked().as_mut() {
(&mut *#tq.get_mut_unchecked().as_mut_ptr()).dequeue(|| #disable_isr, mono)
} else {
// We can only use the timer queue if `init` has returned, and it
@@ -152,7 +150,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
}
}
- rtic::export::interrupt::free(|_| if let Some(mono) = #app_path::#m_ident.get_mut_unchecked().as_mut() {
+ rtic::export::interrupt::free(|_| if let Some(mono) = #m_ident.get_mut_unchecked().as_mut() {
mono.on_interrupt();
});
}