mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-25 21:19:35 +01:00
Fix xtask for async
This commit is contained in:
parent
46a3f2befd
commit
bf54d4dc2b
8 changed files with 42 additions and 18 deletions
19
.github/workflows/build.yml
vendored
19
.github/workflows/build.yml
vendored
|
@ -25,7 +25,7 @@ jobs:
|
|||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
toolchain: nightly
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
|
@ -49,7 +49,7 @@ jobs:
|
|||
- thumbv6m-none-eabi
|
||||
- x86_64-unknown-linux-gnu
|
||||
toolchain:
|
||||
- stable
|
||||
- nightly
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -82,12 +82,13 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install Rust stable
|
||||
- name: Install Rust nightly
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
toolchain: nightly
|
||||
target: x86_64-unknown-linux-gnu
|
||||
override: true
|
||||
components: clippy
|
||||
|
||||
- name: Fail on warnings
|
||||
run: sed -i 's,//deny_warnings_placeholder_for_ci,#![deny(warnings)],' src/lib.rs macros/src/lib.rs
|
||||
|
@ -111,7 +112,7 @@ jobs:
|
|||
- thumbv7m-none-eabi
|
||||
- thumbv6m-none-eabi
|
||||
toolchain:
|
||||
- stable
|
||||
- nightly
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -144,7 +145,7 @@ jobs:
|
|||
- thumbv7m-none-eabi
|
||||
- thumbv6m-none-eabi
|
||||
toolchain:
|
||||
- stable
|
||||
- nightly
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -188,7 +189,7 @@ jobs:
|
|||
target:
|
||||
- x86_64-unknown-linux-gnu
|
||||
toolchain:
|
||||
- stable
|
||||
- nightly
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
@ -224,7 +225,7 @@ jobs:
|
|||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
toolchain: nightly
|
||||
target: x86_64-unknown-linux-gnu
|
||||
override: true
|
||||
|
||||
|
@ -252,7 +253,7 @@ jobs:
|
|||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
toolchain: nightly
|
||||
target: x86_64-unknown-linux-gnu
|
||||
override: true
|
||||
|
||||
|
|
7
ci/expected/async-delay.run
Normal file
7
ci/expected/async-delay.run
Normal file
|
@ -0,0 +1,7 @@
|
|||
init
|
||||
hello from bar
|
||||
hello from baz
|
||||
hello from foo
|
||||
bye from foo
|
||||
bye from bar
|
||||
bye from baz
|
6
ci/expected/async-infinite-loop.run
Normal file
6
ci/expected/async-infinite-loop.run
Normal file
|
@ -0,0 +1,6 @@
|
|||
init
|
||||
hello from async 0
|
||||
hello from async 1
|
||||
hello from async 2
|
||||
hello from async 3
|
||||
hello from async 4
|
5
ci/expected/async-task-multiple-prios.run
Normal file
5
ci/expected/async-task-multiple-prios.run
Normal file
|
@ -0,0 +1,5 @@
|
|||
init
|
||||
hello from normal 2
|
||||
hello from async 2
|
||||
hello from normal 1
|
||||
hello from async 1
|
3
ci/expected/async-task.run
Normal file
3
ci/expected/async-task.run
Normal file
|
@ -0,0 +1,3 @@
|
|||
init
|
||||
hello from normal
|
||||
hello from async
|
5
ci/expected/async-timeout.run
Normal file
5
ci/expected/async-timeout.run
Normal file
|
@ -0,0 +1,5 @@
|
|||
init
|
||||
hello from bar
|
||||
hello from foo
|
||||
foo no timeout
|
||||
bar timeout
|
|
@ -43,7 +43,7 @@ pub fn app(app: &App, _analysis: &Analysis) -> parse::Result<Extra> {
|
|||
let need = priorities
|
||||
.iter()
|
||||
// Only count if not 0
|
||||
.filter_map(|prio| if *prio > 0 { Some(prio) } else { None })
|
||||
.filter(|prio| **prio > 0)
|
||||
.count();
|
||||
let given = app.args.extern_interrupts.len();
|
||||
if need > given {
|
||||
|
|
|
@ -183,14 +183,11 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
|||
}
|
||||
));
|
||||
|
||||
for name in channel.tasks.iter().filter_map(|name| {
|
||||
let task = &app.software_tasks[name];
|
||||
if task.is_async {
|
||||
Some(name)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}) {
|
||||
for name in channel
|
||||
.tasks
|
||||
.iter()
|
||||
.filter(|name| app.software_tasks[*name].is_async)
|
||||
{
|
||||
let exec_name = util::internal_task_ident(name, "EXEC");
|
||||
|
||||
let executor_run_ident = util::executor_run_ident(name);
|
||||
|
|
Loading…
Reference in a new issue