mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 06:15:45 +01:00
Now with spawn/schedule from anywhere
This commit is contained in:
parent
c83b15b643
commit
524273c96a
19 changed files with 172 additions and 694 deletions
|
|
@ -60,24 +60,6 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
pub static mut #rq: #rq_ty = #rq_expr;
|
||||
));
|
||||
|
||||
if let Some(ceiling) = channel.ceiling {
|
||||
items.push(quote!(
|
||||
struct #rq<'a> {
|
||||
priority: &'a rtic::export::Priority,
|
||||
}
|
||||
));
|
||||
|
||||
items.push(util::impl_mutex(
|
||||
extra,
|
||||
&[],
|
||||
false,
|
||||
&rq,
|
||||
rq_ty,
|
||||
ceiling,
|
||||
quote!(&mut #rq),
|
||||
));
|
||||
}
|
||||
|
||||
let arms = channel
|
||||
.tasks
|
||||
.iter()
|
||||
|
|
@ -88,7 +70,7 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
let inputs = util::inputs_ident(name);
|
||||
let (_, tupled, pats, _) = util::regroup_inputs(&task.inputs);
|
||||
|
||||
let (let_instant, instant) = if app.uses_schedule() {
|
||||
let (let_instant, instant) = if extra.monotonic.is_some() {
|
||||
let instants = util::instants_ident(name);
|
||||
|
||||
(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue