Skip to content

Commit 7f81b81

Browse files
committed
Update example
1 parent 22287f3 commit 7f81b81

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

examples/lm3s6965/examples/spawn_local.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ mod app {
1717
#[init]
1818
fn init(_cx: init::Context) -> (Shared, Local) {
1919
task1::spawn().unwrap();
20-
//task2::spawn(Default::default()).ok(); <--- This is rejected since it is a local task
20+
//task2::spawn(Default::default()).ok(); <--- This is rejected since not all args are Send and Sync
2121
(Shared {}, Local {})
2222
}
2323

@@ -27,7 +27,8 @@ mod app {
2727
cx.local_spawner.task2(Default::default()).unwrap();
2828
}
2929

30-
#[task(priority = 1, local_task = true)]
30+
// Task where some args are !Send/!Sync
31+
#[task(priority = 1)]
3132
async fn task2(_cx: task2::Context, _nsns: NotSendNotSync) {
3233
hprintln!("Hello from task2!");
3334
debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator

examples/lm3s6965/examples/wait-queue.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ mod app {
2828
fn init(cx: init::Context) -> (Shared, Local) {
2929
Mono::start(cx.core.SYST, 12_000_000);
3030

31-
incrementer::spawn(cx.local.wait_queue).ok().unwrap();
32-
waiter::spawn(cx.local.wait_queue).ok().unwrap();
31+
incrementer::spawn(&*cx.local.wait_queue).ok().unwrap();
32+
waiter::spawn(&*cx.local.wait_queue).ok().unwrap();
3333

3434
let count = 0;
3535

0 commit comments

Comments
 (0)