From 7614b96fe45240dafe91ae549e712b560e2d4c10 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 31 Dec 2022 14:45:13 +0100 Subject: RTIC v2: Initial commit rtic-syntax is now part of RTIC repository --- macros/src/codegen/software_tasks.rs | 132 ++++++++++++++++++++--------------- 1 file changed, 76 insertions(+), 56 deletions(-) (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index 226121d..f9247da 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -1,17 +1,14 @@ -use proc_macro2::TokenStream as TokenStream2; -use quote::quote; -use rtic_syntax::{ast::App, Context}; - +use crate::syntax::{ast::App, Context}; use crate::{ analyze::Analysis, - check::Extra, codegen::{local_resources_struct, module, shared_resources_struct, util}, }; +use proc_macro2::TokenStream as TokenStream2; +use quote::quote; pub fn codegen( app: &App, analysis: &Analysis, - extra: &Extra, ) -> ( // mod_app_software_tasks -- free queues, buffers and `${task}Resources` constructors Vec, @@ -27,74 +24,87 @@ pub fn codegen( let mut root = vec![]; let mut user_tasks = vec![]; - for (name, task) in &app.software_tasks { + // Any task + for (name, task) in app.software_tasks.iter() { let inputs = &task.inputs; - let cfgs = &task.cfgs; let (_, _, _, input_ty) = util::regroup_inputs(inputs); let cap = task.args.capacity; let cap_lit = util::capacity_literal(cap as usize); let cap_lit_p1 = util::capacity_literal(cap as usize + 1); - // Create free queues and inputs / instants buffers - let fq = util::fq_ident(name); - - #[allow(clippy::redundant_closure)] - let (fq_ty, fq_expr, mk_uninit): (_, _, Box Option<_>>) = { - ( - quote!(rtic::export::SCFQ<#cap_lit_p1>), - quote!(rtic::export::Queue::new()), - Box::new(|| Some(util::link_section_uninit())), - ) - }; - mod_app.push(quote!( - // /// Queue version of a free-list that keeps track of empty slots in - // /// the following buffers - #(#cfgs)* - #[allow(non_camel_case_types)] - #[allow(non_upper_case_globals)] - #[doc(hidden)] - static #fq: rtic::RacyCell<#fq_ty> = rtic::RacyCell::new(#fq_expr); - )); - - let elems = &(0..cap) - .map(|_| quote!(core::mem::MaybeUninit::uninit())) - .collect::>(); + if !task.is_async { + // Create free queues and inputs / instants buffers + let fq = util::fq_ident(name); - for (_, monotonic) in &app.monotonics { - let instants = util::monotonic_instants_ident(name, &monotonic.ident); - let mono_type = &monotonic.ty; - let cfgs = &monotonic.cfgs; + #[allow(clippy::redundant_closure)] + let (fq_ty, fq_expr, mk_uninit): (_, _, Box Option<_>>) = { + ( + quote!(rtic::export::SCFQ<#cap_lit_p1>), + quote!(rtic::export::Queue::new()), + Box::new(|| Some(util::link_section_uninit())), + ) + }; - let uninit = mk_uninit(); - // For future use - // let doc = format!(" RTIC internal: {}:{}", file!(), line!()); mod_app.push(quote!( + // /// Queue version of a free-list that keeps track of empty slots in + // /// the following buffers + #[allow(non_camel_case_types)] + #[allow(non_upper_case_globals)] + #[doc(hidden)] + static #fq: rtic::RacyCell<#fq_ty> = rtic::RacyCell::new(#fq_expr); + )); + + let elems = &(0..cap) + .map(|_| quote!(core::mem::MaybeUninit::uninit())) + .collect::>(); + + for (_, monotonic) in &app.monotonics { + let instants = util::monotonic_instants_ident(name, &monotonic.ident); + let mono_type = &monotonic.ty; + + let uninit = mk_uninit(); + // For future use + // let doc = format!(" RTIC internal: {}:{}", file!(), line!()); + mod_app.push(quote!( #uninit // /// Buffer that holds the instants associated to the inputs of a task // #[doc = #doc] #[allow(non_camel_case_types)] #[allow(non_upper_case_globals)] #[doc(hidden)] - #(#cfgs)* static #instants: rtic::RacyCell<[core::mem::MaybeUninit<<#mono_type as rtic::Monotonic>::Instant>; #cap_lit]> = rtic::RacyCell::new([#(#elems,)*]); )); + } + + let uninit = mk_uninit(); + let inputs_ident = util::inputs_ident(name); + + // Buffer that holds the inputs of a task + mod_app.push(quote!( + #uninit + #[allow(non_camel_case_types)] + #[allow(non_upper_case_globals)] + #[doc(hidden)] + static #inputs_ident: rtic::RacyCell<[core::mem::MaybeUninit<#input_ty>; #cap_lit]> = + rtic::RacyCell::new([#(#elems,)*]); + )); } - let uninit = mk_uninit(); - let inputs_ident = util::inputs_ident(name); - mod_app.push(quote!( - #uninit - // /// Buffer that holds the inputs of a task - #[allow(non_camel_case_types)] - #[allow(non_upper_case_globals)] - #[doc(hidden)] - #(#cfgs)* - static #inputs_ident: rtic::RacyCell<[core::mem::MaybeUninit<#input_ty>; #cap_lit]> = - rtic::RacyCell::new([#(#elems,)*]); - )); + if task.is_async { + let executor_ident = util::executor_run_ident(name); + mod_app.push(quote!( + #[allow(non_camel_case_types)] + #[allow(non_upper_case_globals)] + #[doc(hidden)] + static #executor_ident: core::sync::atomic::AtomicBool = + core::sync::atomic::AtomicBool::new(false); + )); + } + + let inputs = &task.inputs; // `${task}Resources` let mut shared_needs_lt = false; @@ -130,13 +140,24 @@ pub fn codegen( let attrs = &task.attrs; let cfgs = &task.cfgs; let stmts = &task.stmts; - let user_task_doc = format!(" User SW task {name}"); + let (async_marker, context_lifetime) = if task.is_async { + ( + quote!(async), + if shared_needs_lt || local_needs_lt { + quote!(<'static>) + } else { + quote!() + }, + ) + } else { + (quote!(), quote!()) + }; + user_tasks.push(quote!( - #[doc = #user_task_doc] #(#attrs)* #(#cfgs)* #[allow(non_snake_case)] - fn #name(#context: #name::Context #(,#inputs)*) { + #async_marker fn #name(#context: #name::Context #context_lifetime #(,#inputs)*) { use rtic::Mutex as _; use rtic::mutex::prelude::*; @@ -151,7 +172,6 @@ pub fn codegen( local_needs_lt, app, analysis, - extra, )); } -- cgit v1.2.3 From f8352122a301c30db7c7851ebf50ad1608ebdad3 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Tue, 3 Jan 2023 15:10:59 +0100 Subject: Min codegen --- macros/src/codegen/software_tasks.rs | 179 ----------------------------------- 1 file changed, 179 deletions(-) delete mode 100644 macros/src/codegen/software_tasks.rs (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs deleted file mode 100644 index f9247da..0000000 --- a/macros/src/codegen/software_tasks.rs +++ /dev/null @@ -1,179 +0,0 @@ -use crate::syntax::{ast::App, Context}; -use crate::{ - analyze::Analysis, - codegen::{local_resources_struct, module, shared_resources_struct, util}, -}; -use proc_macro2::TokenStream as TokenStream2; -use quote::quote; - -pub fn codegen( - app: &App, - analysis: &Analysis, -) -> ( - // mod_app_software_tasks -- free queues, buffers and `${task}Resources` constructors - Vec, - // root_software_tasks -- items that must be placed in the root of the crate: - // - `${task}Locals` structs - // - `${task}Resources` structs - // - `${task}` modules - Vec, - // user_software_tasks -- the `#[task]` functions written by the user - Vec, -) { - let mut mod_app = vec![]; - let mut root = vec![]; - let mut user_tasks = vec![]; - - // Any task - for (name, task) in app.software_tasks.iter() { - let inputs = &task.inputs; - let (_, _, _, input_ty) = util::regroup_inputs(inputs); - - let cap = task.args.capacity; - let cap_lit = util::capacity_literal(cap as usize); - let cap_lit_p1 = util::capacity_literal(cap as usize + 1); - - if !task.is_async { - // Create free queues and inputs / instants buffers - let fq = util::fq_ident(name); - - #[allow(clippy::redundant_closure)] - let (fq_ty, fq_expr, mk_uninit): (_, _, Box Option<_>>) = { - ( - quote!(rtic::export::SCFQ<#cap_lit_p1>), - quote!(rtic::export::Queue::new()), - Box::new(|| Some(util::link_section_uninit())), - ) - }; - - mod_app.push(quote!( - // /// Queue version of a free-list that keeps track of empty slots in - // /// the following buffers - #[allow(non_camel_case_types)] - #[allow(non_upper_case_globals)] - #[doc(hidden)] - static #fq: rtic::RacyCell<#fq_ty> = rtic::RacyCell::new(#fq_expr); - )); - - let elems = &(0..cap) - .map(|_| quote!(core::mem::MaybeUninit::uninit())) - .collect::>(); - - for (_, monotonic) in &app.monotonics { - let instants = util::monotonic_instants_ident(name, &monotonic.ident); - let mono_type = &monotonic.ty; - - let uninit = mk_uninit(); - // For future use - // let doc = format!(" RTIC internal: {}:{}", file!(), line!()); - mod_app.push(quote!( - #uninit - // /// Buffer that holds the instants associated to the inputs of a task - // #[doc = #doc] - #[allow(non_camel_case_types)] - #[allow(non_upper_case_globals)] - #[doc(hidden)] - static #instants: - rtic::RacyCell<[core::mem::MaybeUninit<<#mono_type as rtic::Monotonic>::Instant>; #cap_lit]> = - rtic::RacyCell::new([#(#elems,)*]); - )); - } - - let uninit = mk_uninit(); - let inputs_ident = util::inputs_ident(name); - - // Buffer that holds the inputs of a task - mod_app.push(quote!( - #uninit - #[allow(non_camel_case_types)] - #[allow(non_upper_case_globals)] - #[doc(hidden)] - static #inputs_ident: rtic::RacyCell<[core::mem::MaybeUninit<#input_ty>; #cap_lit]> = - rtic::RacyCell::new([#(#elems,)*]); - )); - } - - if task.is_async { - let executor_ident = util::executor_run_ident(name); - mod_app.push(quote!( - #[allow(non_camel_case_types)] - #[allow(non_upper_case_globals)] - #[doc(hidden)] - static #executor_ident: core::sync::atomic::AtomicBool = - core::sync::atomic::AtomicBool::new(false); - )); - } - - let inputs = &task.inputs; - - // `${task}Resources` - let mut shared_needs_lt = false; - let mut local_needs_lt = false; - - // `${task}Locals` - if !task.args.local_resources.is_empty() { - let (item, constructor) = local_resources_struct::codegen( - Context::SoftwareTask(name), - &mut local_needs_lt, - app, - ); - - root.push(item); - - mod_app.push(constructor); - } - - if !task.args.shared_resources.is_empty() { - let (item, constructor) = shared_resources_struct::codegen( - Context::SoftwareTask(name), - &mut shared_needs_lt, - app, - ); - - root.push(item); - - mod_app.push(constructor); - } - - if !&task.is_extern { - let context = &task.context; - let attrs = &task.attrs; - let cfgs = &task.cfgs; - let stmts = &task.stmts; - let (async_marker, context_lifetime) = if task.is_async { - ( - quote!(async), - if shared_needs_lt || local_needs_lt { - quote!(<'static>) - } else { - quote!() - }, - ) - } else { - (quote!(), quote!()) - }; - - user_tasks.push(quote!( - #(#attrs)* - #(#cfgs)* - #[allow(non_snake_case)] - #async_marker fn #name(#context: #name::Context #context_lifetime #(,#inputs)*) { - use rtic::Mutex as _; - use rtic::mutex::prelude::*; - - #(#stmts)* - } - )); - } - - root.push(module::codegen( - Context::SoftwareTask(name), - shared_needs_lt, - local_needs_lt, - app, - analysis, - )); - } - - (mod_app, root, user_tasks) -} -- cgit v1.2.3 From d27d0fe33fdb54e6a11a1e9d09a7916f19e5c9ec Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Wed, 4 Jan 2023 20:01:05 +0100 Subject: Added software task codegen back --- macros/src/codegen/software_tasks.rs | 101 +++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 macros/src/codegen/software_tasks.rs (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs new file mode 100644 index 0000000..b2b468c --- /dev/null +++ b/macros/src/codegen/software_tasks.rs @@ -0,0 +1,101 @@ +use crate::syntax::{ast::App, Context}; +use crate::{ + analyze::Analysis, + codegen::{local_resources_struct, module, shared_resources_struct, util}, +}; +use proc_macro2::TokenStream as TokenStream2; +use quote::quote; + +pub fn codegen( + app: &App, + analysis: &Analysis, +) -> ( + // mod_app_software_tasks -- free queues, buffers and `${task}Resources` constructors + Vec, + // root_software_tasks -- items that must be placed in the root of the crate: + // - `${task}Locals` structs + // - `${task}Resources` structs + // - `${task}` modules + Vec, + // user_software_tasks -- the `#[task]` functions written by the user + Vec, +) { + let mut mod_app = vec![]; + let mut root = vec![]; + let mut user_tasks = vec![]; + + // Any task + for (name, task) in app.software_tasks.iter() { + let executor_ident = util::executor_run_ident(name); + mod_app.push(quote!( + #[allow(non_camel_case_types)] + #[allow(non_upper_case_globals)] + #[doc(hidden)] + static #executor_ident: core::sync::atomic::AtomicBool = + core::sync::atomic::AtomicBool::new(false); + )); + + // `${task}Resources` + let mut shared_needs_lt = false; + let mut local_needs_lt = false; + + // `${task}Locals` + if !task.args.local_resources.is_empty() { + let (item, constructor) = local_resources_struct::codegen( + Context::SoftwareTask(name), + &mut local_needs_lt, + app, + ); + + root.push(item); + + mod_app.push(constructor); + } + + if !task.args.shared_resources.is_empty() { + let (item, constructor) = shared_resources_struct::codegen( + Context::SoftwareTask(name), + &mut shared_needs_lt, + app, + ); + + root.push(item); + + mod_app.push(constructor); + } + + if !&task.is_extern { + let context = &task.context; + let attrs = &task.attrs; + let cfgs = &task.cfgs; + let stmts = &task.stmts; + let context_lifetime = if shared_needs_lt || local_needs_lt { + quote!(<'static>) + } else { + quote!() + }; + + user_tasks.push(quote!( + #(#attrs)* + #(#cfgs)* + #[allow(non_snake_case)] + async fn #name(#context: #name::Context #context_lifetime) { + use rtic::Mutex as _; + use rtic::mutex::prelude::*; + + #(#stmts)* + } + )); + } + + root.push(module::codegen( + Context::SoftwareTask(name), + shared_needs_lt, + local_needs_lt, + app, + analysis, + )); + } + + (mod_app, root, user_tasks) +} -- cgit v1.2.3 From 714020a624ca93c42d5da7ebe612e7fc668e1471 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 7 Jan 2023 11:24:13 +0100 Subject: Removed Priority, simplified lifetime handling --- macros/src/codegen/software_tasks.rs | 31 ++++++------------------------- 1 file changed, 6 insertions(+), 25 deletions(-) (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index b2b468c..350c1e6 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -36,16 +36,11 @@ pub fn codegen( )); // `${task}Resources` - let mut shared_needs_lt = false; - let mut local_needs_lt = false; // `${task}Locals` if !task.args.local_resources.is_empty() { - let (item, constructor) = local_resources_struct::codegen( - Context::SoftwareTask(name), - &mut local_needs_lt, - app, - ); + let (item, constructor) = + local_resources_struct::codegen(Context::SoftwareTask(name), app); root.push(item); @@ -53,11 +48,8 @@ pub fn codegen( } if !task.args.shared_resources.is_empty() { - let (item, constructor) = shared_resources_struct::codegen( - Context::SoftwareTask(name), - &mut shared_needs_lt, - app, - ); + let (item, constructor) = + shared_resources_struct::codegen(Context::SoftwareTask(name), app); root.push(item); @@ -69,17 +61,12 @@ pub fn codegen( let attrs = &task.attrs; let cfgs = &task.cfgs; let stmts = &task.stmts; - let context_lifetime = if shared_needs_lt || local_needs_lt { - quote!(<'static>) - } else { - quote!() - }; user_tasks.push(quote!( #(#attrs)* #(#cfgs)* #[allow(non_snake_case)] - async fn #name(#context: #name::Context #context_lifetime) { + async fn #name(#context: #name::Context<'static>) { use rtic::Mutex as _; use rtic::mutex::prelude::*; @@ -88,13 +75,7 @@ pub fn codegen( )); } - root.push(module::codegen( - Context::SoftwareTask(name), - shared_needs_lt, - local_needs_lt, - app, - analysis, - )); + root.push(module::codegen(Context::SoftwareTask(name), app, analysis)); } (mod_app, root, user_tasks) -- cgit v1.2.3 From 76595b7aedd2a14aea8569b75fabe62120f93230 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 7 Jan 2023 14:26:55 +0100 Subject: All codegen is now explicit --- macros/src/codegen/software_tasks.rs | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index 350c1e6..4cb1fa9 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -6,20 +6,7 @@ use crate::{ use proc_macro2::TokenStream as TokenStream2; use quote::quote; -pub fn codegen( - app: &App, - analysis: &Analysis, -) -> ( - // mod_app_software_tasks -- free queues, buffers and `${task}Resources` constructors - Vec, - // root_software_tasks -- items that must be placed in the root of the crate: - // - `${task}Locals` structs - // - `${task}Resources` structs - // - `${task}` modules - Vec, - // user_software_tasks -- the `#[task]` functions written by the user - Vec, -) { +pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { let mut mod_app = vec![]; let mut root = vec![]; let mut user_tasks = vec![]; @@ -78,5 +65,11 @@ pub fn codegen( root.push(module::codegen(Context::SoftwareTask(name), app, analysis)); } - (mod_app, root, user_tasks) + quote!( + #(#mod_app)* + + #(#root)* + + #(#user_tasks)* + ) } -- cgit v1.2.3 From cd790a94286cdc307d399b7f7a43e305e90de5bf Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 9 Jan 2023 21:02:53 +0100 Subject: More work on new spawn/executor --- macros/src/codegen/software_tasks.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index 4cb1fa9..b923283 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -1,7 +1,7 @@ use crate::syntax::{ast::App, Context}; use crate::{ analyze::Analysis, - codegen::{local_resources_struct, module, shared_resources_struct, util}, + codegen::{local_resources_struct, module, shared_resources_struct}, }; use proc_macro2::TokenStream as TokenStream2; use quote::quote; @@ -13,18 +13,6 @@ pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { // Any task for (name, task) in app.software_tasks.iter() { - let executor_ident = util::executor_run_ident(name); - mod_app.push(quote!( - #[allow(non_camel_case_types)] - #[allow(non_upper_case_globals)] - #[doc(hidden)] - static #executor_ident: core::sync::atomic::AtomicBool = - core::sync::atomic::AtomicBool::new(false); - )); - - // `${task}Resources` - - // `${task}Locals` if !task.args.local_resources.is_empty() { let (item, constructor) = local_resources_struct::codegen(Context::SoftwareTask(name), app); -- cgit v1.2.3 From d6d58b0eb88242cf63724e1420bd29f8a4489916 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Tue, 10 Jan 2023 21:03:10 +0100 Subject: Async tasks can now take arguments at spawn again --- macros/src/codegen/software_tasks.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs index b923283..34fc851 100644 --- a/macros/src/codegen/software_tasks.rs +++ b/macros/src/codegen/software_tasks.rs @@ -36,12 +36,13 @@ pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { let attrs = &task.attrs; let cfgs = &task.cfgs; let stmts = &task.stmts; + let inputs = &task.inputs; user_tasks.push(quote!( #(#attrs)* #(#cfgs)* #[allow(non_snake_case)] - async fn #name(#context: #name::Context<'static>) { + async fn #name<'a>(#context: #name::Context<'a> #(,#inputs)*) { use rtic::Mutex as _; use rtic::mutex::prelude::*; -- cgit v1.2.3 From 306aa47170fd59369b7a184924e287dc3706d64d Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Mon, 23 Jan 2023 20:05:47 +0100 Subject: Add rtic-timer (timerqueue + monotonic) and rtic-monotonics (systick-monotonic) --- macros/src/codegen/software_tasks.rs | 64 ------------------------------------ 1 file changed, 64 deletions(-) delete mode 100644 macros/src/codegen/software_tasks.rs (limited to 'macros/src/codegen/software_tasks.rs') diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs deleted file mode 100644 index 34fc851..0000000 --- a/macros/src/codegen/software_tasks.rs +++ /dev/null @@ -1,64 +0,0 @@ -use crate::syntax::{ast::App, Context}; -use crate::{ - analyze::Analysis, - codegen::{local_resources_struct, module, shared_resources_struct}, -}; -use proc_macro2::TokenStream as TokenStream2; -use quote::quote; - -pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { - let mut mod_app = vec![]; - let mut root = vec![]; - let mut user_tasks = vec![]; - - // Any task - for (name, task) in app.software_tasks.iter() { - if !task.args.local_resources.is_empty() { - let (item, constructor) = - local_resources_struct::codegen(Context::SoftwareTask(name), app); - - root.push(item); - - mod_app.push(constructor); - } - - if !task.args.shared_resources.is_empty() { - let (item, constructor) = - shared_resources_struct::codegen(Context::SoftwareTask(name), app); - - root.push(item); - - mod_app.push(constructor); - } - - if !&task.is_extern { - let context = &task.context; - let attrs = &task.attrs; - let cfgs = &task.cfgs; - let stmts = &task.stmts; - let inputs = &task.inputs; - - user_tasks.push(quote!( - #(#attrs)* - #(#cfgs)* - #[allow(non_snake_case)] - async fn #name<'a>(#context: #name::Context<'a> #(,#inputs)*) { - use rtic::Mutex as _; - use rtic::mutex::prelude::*; - - #(#stmts)* - } - )); - } - - root.push(module::codegen(Context::SoftwareTask(name), app, analysis)); - } - - quote!( - #(#mod_app)* - - #(#root)* - - #(#user_tasks)* - ) -} -- cgit v1.2.3