diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2023-01-08 19:40:31 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-03-01 00:33:28 +0100 |
| commit | ceaf3613d3256f60b139a4f93220e3c298603b83 (patch) | |
| tree | 02ee64f2ac4bebea1abe85f85ca761e44ea8beb9 /examples/lock.rs | |
| parent | 9a67f00a30f14df3b9635913f728afd0b40c138d (diff) | |
Update semihosting
Diffstat (limited to 'examples/lock.rs')
| -rw-r--r-- | examples/lock.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/lock.rs b/examples/lock.rs index 50b6aaa..3c1a514 100644 --- a/examples/lock.rs +++ b/examples/lock.rs @@ -30,7 +30,7 @@ mod app { // when omitted priority is assumed to be `1` #[task(shared = [shared])] async fn foo(mut c: foo::Context) { - hprintln!("A").unwrap(); + hprintln!("A"); // the lower priority task requires a critical section to access the data c.shared.shared.lock(|shared| { @@ -40,7 +40,7 @@ mod app { // bar will *not* run right now due to the critical section bar::spawn().unwrap(); - hprintln!("B - shared = {}", *shared).unwrap(); + hprintln!("B - shared = {}", *shared); // baz does not contend for `shared` so it's allowed to run now baz::spawn().unwrap(); @@ -48,7 +48,7 @@ mod app { // critical section is over: bar can now start - hprintln!("E").unwrap(); + hprintln!("E"); debug::exit(debug::EXIT_SUCCESS); // Exit QEMU simulator } @@ -62,11 +62,11 @@ mod app { *shared }); - hprintln!("D - shared = {}", shared).unwrap(); + hprintln!("D - shared = {}", shared); } #[task(priority = 3)] async fn baz(_: baz::Context) { - hprintln!("C").unwrap(); + hprintln!("C"); } } |
