diff options
author | 2023-01-07 13:58:15 +0100 | |
---|---|---|
committer | 2023-03-01 00:31:07 +0100 | |
commit | 9247252cc74fab4a421f8e8370b29c37ca2fa48a (patch) | |
tree | a852e5d0f5a424ecb2254ee8455b59a01ea8077d /examples/async-task.rs | |
parent | fe2b5cc52ee634346bc8aecf5041b6af9fdea529 (diff) | |
download | rtic-9247252cc74fab4a421f8e8370b29c37ca2fa48a.tar.gz rtic-9247252cc74fab4a421f8e8370b29c37ca2fa48a.tar.zst rtic-9247252cc74fab4a421f8e8370b29c37ca2fa48a.zip |
examples/async-task fixup
Diffstat (limited to '')
-rw-r--r-- | examples/async-task.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/async-task.rs b/examples/async-task.rs index 45d44fd5..012e95ee 100644 --- a/examples/async-task.rs +++ b/examples/async-task.rs @@ -6,7 +6,7 @@ use panic_semihosting as _; // NOTES: // -// - Async tasks cannot have `#[lock_free]` resources, as they can interleve and each async +// - Async tasks cannot have `#[lock_free]` resources, as they can interleave and each async // task can have a mutable reference stored. // - Spawning an async task equates to it being polled once. @@ -23,7 +23,7 @@ mod app { struct Local {} #[init] - fn init(cx: init::Context) -> (Shared, Local) { + fn init(_cx: init::Context) -> (Shared, Local) { hprintln!("init").unwrap(); async_task::spawn().unwrap(); @@ -43,13 +43,13 @@ mod app { #[task(binds = UART1, shared = [a])] fn hw_task(cx: hw_task::Context) { - let hw_task::SharedResources { a, .. } = cx.shared; + let hw_task::SharedResources { a: _, .. } = cx.shared; hprintln!("hello from hw").ok(); } #[task(shared = [a])] async fn async_task(cx: async_task::Context) { - let async_task::SharedResources { a, .. } = cx.shared; + let async_task::SharedResources { a: _, .. } = cx.shared; hprintln!("hello from async").ok(); debug::exit(debug::EXIT_SUCCESS); @@ -57,7 +57,7 @@ mod app { #[task(priority = 2, shared = [a])] async fn async_task2(cx: async_task2::Context) { - let async_task2::SharedResources { a, .. } = cx.shared; + let async_task2::SharedResources { a: _, .. } = cx.shared; hprintln!("hello from async2").ok(); } } |