From e8eca4be37a2fe1af25b203ace5e99b31fcc3972 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Thu, 22 Oct 2020 21:36:32 +0200 Subject: Now all locks are symmetric Test fixes Fix test Fix comment --- examples/late.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples/late.rs') diff --git a/examples/late.rs b/examples/late.rs index d20a69c..d4efaba 100644 --- a/examples/late.rs +++ b/examples/late.rs @@ -35,9 +35,9 @@ mod app { } #[idle(resources = [c])] - fn idle(c: idle::Context) -> ! { + fn idle(mut c: idle::Context) -> ! { loop { - if let Some(byte) = c.resources.c.dequeue() { + if let Some(byte) = c.resources.c.lock(|c| c.dequeue()) { hprintln!("received message: {}", byte).unwrap(); debug::exit(debug::EXIT_SUCCESS); @@ -48,7 +48,7 @@ mod app { } #[task(binds = UART0, resources = [p])] - fn uart0(c: uart0::Context) { - c.resources.p.enqueue(42).unwrap(); + fn uart0(mut c: uart0::Context) { + c.resources.p.lock(|p| p.enqueue(42).unwrap()); } } -- cgit v1.2.3