diff options
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 50b6aaae..3c1a5142 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"); } } |