From 3e165f2a42b8f3c66e3e77742a54feb875ec4bd6 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 21 Apr 2017 15:31:02 -0500 Subject: drop `lock` methods, add `raise_to` function --- tests/cfail/ceiling.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/cfail/ceiling.rs') diff --git a/tests/cfail/ceiling.rs b/tests/cfail/ceiling.rs index a10aee9..bd6e296 100644 --- a/tests/cfail/ceiling.rs +++ b/tests/cfail/ceiling.rs @@ -5,9 +5,11 @@ use rtfm::{C3, P0, P2, Resource}; static R1: Resource<(), C3> = Resource::new(()); fn j1(prio: P2) { - let c3 = R1.lock(&prio, |r1, c3| { + let ceil = prio.as_ceiling(); + + let c3 = rtfm::raise_to(ceil, &R1, |ceil| { // forbidden: ceiling token can't outlive critical section - c3 //~ error + ceil //~ error }); // Would be bad: lockless access to a resource with ceiling = 3 -- cgit v1.2.3