aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/assertions.rs
diff options
context:
space:
mode:
authorGravatar Henrik Tjäder <henrik@tjaders.com> 2020-08-27 11:21:56 +0000
committerGravatar Henrik Tjäder <henrik@tjaders.com> 2020-09-01 14:50:06 +0000
commit76cf14c520091d00985f845203580e14c611ed14 (patch)
tree786278fef57314138f4a50eb59be0dac8a9deb5f /macros/src/codegen/assertions.rs
parentc5e6d1fa49e3596227a8ee8fe89e2e4f66db3169 (diff)
downloadrtic-76cf14c520091d00985f845203580e14c611ed14.tar.gz
rtic-76cf14c520091d00985f845203580e14c611ed14.tar.zst
rtic-76cf14c520091d00985f845203580e14c611ed14.zip
Brutally yank out multicore
Diffstat (limited to 'macros/src/codegen/assertions.rs')
-rw-r--r--macros/src/codegen/assertions.rs18
1 files changed, 10 insertions, 8 deletions
diff --git a/macros/src/codegen/assertions.rs b/macros/src/codegen/assertions.rs
index 51bbdbff..a7c26a5e 100644
--- a/macros/src/codegen/assertions.rs
+++ b/macros/src/codegen/assertions.rs
@@ -1,33 +1,35 @@
use proc_macro2::TokenStream as TokenStream2;
use quote::quote;
-use crate::{analyze::Analysis, check::Extra};
+use crate::analyze::Analysis;
/// Generates compile-time assertions that check that types implement the `Send` / `Sync` traits
-pub fn codegen(core: u8, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream2> {
+pub fn codegen(analysis: &Analysis) -> Vec<TokenStream2> {
let mut stmts = vec![];
// we don't generate *all* assertions on all cores because the user could conditionally import a
// type only on some core (e.g. `#[cfg(core = "0")] use some::Type;`)
- if let Some(types) = analysis.send_types.get(&core) {
- for ty in types {
+ //if let Some(types) = analysis.send_types {
+ for ty in &analysis.send_types {
stmts.push(quote!(rtic::export::assert_send::<#ty>();));
}
- }
+ //}
- if let Some(types) = analysis.sync_types.get(&core) {
- for ty in types {
+ //if let Some(types) = analysis.sync_types {
+ for ty in &analysis.sync_types {
stmts.push(quote!(rtic::export::assert_sync::<#ty>();));
}
- }
+ //}
// if the `schedule` API is used in more than one core then we need to check that the
// `monotonic` timer can be used in multi-core context
+ /*
if analysis.timer_queues.len() > 1 && analysis.timer_queues.contains_key(&core) {
let monotonic = extra.monotonic();
stmts.push(quote!(rtic::export::assert_multicore::<#monotonic>();));
}
+ */
stmts
}