aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/hardware_tasks.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/hardware_tasks.rs
parentc5e6d1fa49e3596227a8ee8fe89e2e4f66db3169 (diff)
downloadrtic-76cf14c520091d00985f845203580e14c611ed14.tar.gz
rtic-76cf14c520091d00985f845203580e14c611ed14.tar.zst
rtic-76cf14c520091d00985f845203580e14c611ed14.zip
Brutally yank out multicore
Diffstat (limited to 'macros/src/codegen/hardware_tasks.rs')
-rw-r--r--macros/src/codegen/hardware_tasks.rs18
1 files changed, 5 insertions, 13 deletions
diff --git a/macros/src/codegen/hardware_tasks.rs b/macros/src/codegen/hardware_tasks.rs
index 453dbccb..37df33de 100644
--- a/macros/src/codegen/hardware_tasks.rs
+++ b/macros/src/codegen/hardware_tasks.rs
@@ -29,10 +29,8 @@ pub fn codegen(
let mut user_tasks = vec![];
for (name, task) in &app.hardware_tasks {
- let core = task.args.core;
- let cfg_core = util::cfg_core(core, app.args.cores);
- let (let_instant, instant) = if app.uses_schedule(core) {
+ let (let_instant, instant) = if app.uses_schedule() {
let m = extra.monotonic();
(
@@ -49,19 +47,14 @@ pub fn codegen(
quote!(#name::Locals::new(),)
};
- let symbol = if cfg!(feature = "homogeneous") {
- util::suffixed(&task.args.binds.to_string(), core)
- } else {
- task.args.binds.clone()
- };
+ let symbol = task.args.binds.clone();
let priority = task.args.priority;
- let section = util::link_section("text", core);
+ let section = util::link_section("text");
const_app.push(quote!(
#[allow(non_snake_case)]
#[no_mangle]
#section
- #cfg_core
unsafe fn #symbol() {
const PRIORITY: u8 = #priority;
@@ -104,7 +97,7 @@ pub fn codegen(
let mut locals_pat = None;
if !task.locals.is_empty() {
let (struct_, pat) =
- locals::codegen(Context::HardwareTask(name), &task.locals, core, app);
+ locals::codegen(Context::HardwareTask(name), &task.locals, app);
root.push(struct_);
locals_pat = Some(pat);
@@ -113,8 +106,7 @@ pub fn codegen(
let attrs = &task.attrs;
let context = &task.context;
let stmts = &task.stmts;
- let section = util::link_section("text", core);
- // XXX shouldn't this have a cfg_core?
+ let section = util::link_section("text");
let locals_pat = locals_pat.iter();
user_tasks.push(quote!(
#(#attrs)*