diff options
author | 2020-08-27 11:21:56 +0000 | |
---|---|---|
committer | 2020-09-01 14:50:06 +0000 | |
commit | 76cf14c520091d00985f845203580e14c611ed14 (patch) | |
tree | 786278fef57314138f4a50eb59be0dac8a9deb5f /macros/src/analyze.rs | |
parent | c5e6d1fa49e3596227a8ee8fe89e2e4f66db3169 (diff) | |
download | rtic-76cf14c520091d00985f845203580e14c611ed14.tar.gz rtic-76cf14c520091d00985f845203580e14c611ed14.tar.zst rtic-76cf14c520091d00985f845203580e14c611ed14.zip |
Brutally yank out multicore
Diffstat (limited to 'macros/src/analyze.rs')
-rw-r--r-- | macros/src/analyze.rs | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/macros/src/analyze.rs b/macros/src/analyze.rs index af6811fa..c81c186d 100644 --- a/macros/src/analyze.rs +++ b/macros/src/analyze.rs @@ -4,14 +4,14 @@ use std::collections::{BTreeMap, BTreeSet}; use rtic_syntax::{ analyze::{self, Priority}, ast::App, - Core, P, + P, }; use syn::Ident; /// Extend the upstream `Analysis` struct with our field pub struct Analysis { parent: P<analyze::Analysis>, - pub interrupts: BTreeMap<Core, BTreeMap<Priority, Ident>>, + pub interrupts: BTreeMap<Priority, Ident>, } impl ops::Deref for Analysis { @@ -25,32 +25,24 @@ impl ops::Deref for Analysis { // Assign an `extern` interrupt to each priority level pub fn app(analysis: P<analyze::Analysis>, app: &App) -> P<Analysis> { let mut interrupts = BTreeMap::new(); - for core in 0..app.args.cores { let priorities = app .software_tasks .values() .filter_map(|task| { - if task.args.core == core { Some(task.args.priority) - } else { - None - } }) - .chain(analysis.timer_queues.get(&core).map(|tq| tq.priority)) + .chain(analysis.timer_queues.first().map(|tq| tq.priority)) .collect::<BTreeSet<_>>(); if !priorities.is_empty() { - interrupts.insert( - core, + interrupts = priorities .iter() .cloned() .rev() - .zip(app.extern_interrupts[&core].keys().cloned()) - .collect(), - ); + .zip(app.extern_interrupts.keys().cloned()) + .collect(); } - } P::new(Analysis { parent: analysis, |