From 97a7e38db7eb0643a6334aba30077622d09e5c85 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Tue, 18 Jul 2017 20:03:22 -0500 Subject: tasks / idle have exclusive access to Threshold, but do not own the token --- tests/cfail/lock.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/cfail/lock.rs') diff --git a/tests/cfail/lock.rs b/tests/cfail/lock.rs index f93b79a..736027e 100644 --- a/tests/cfail/lock.rs +++ b/tests/cfail/lock.rs @@ -45,7 +45,7 @@ fn idle() -> ! { task!(EXTI0, exti0); -fn exti0(mut t: Threshold, r: EXTI0::Resources) { +fn exti0(mut t: &mut Threshold, r: EXTI0::Resources) { // OK need to lock to access the resource if r.STATE.claim(&mut t, |state, _| **state) {} @@ -55,7 +55,7 @@ fn exti0(mut t: Threshold, r: EXTI0::Resources) { task!(EXTI1, exti1); -fn exti1(mut t: Threshold, r: EXTI1::Resources) { +fn exti1(mut t: &mut Threshold, r: EXTI1::Resources) { // ERROR no need to lock. Has direct access because priority == ceiling if r.STATE.claim(&mut t, |state, _| **state) { //~^ error no method named `claim` found for type -- cgit v1.2.3