From fc4cb7d472dad1ea0fa137bb116bd907efc19601 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Mon, 8 May 2017 12:05:42 -0500 Subject: replace the ceiling token with a preemption threshold token --- tests/cfail/ceiling.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/cfail/ceiling.rs') diff --git a/tests/cfail/ceiling.rs b/tests/cfail/ceiling.rs index d1961c9..118dbcf 100644 --- a/tests/cfail/ceiling.rs +++ b/tests/cfail/ceiling.rs @@ -1,19 +1,19 @@ extern crate cortex_m_rtfm as rtfm; -use rtfm::{C2, C3, P0, P2, Resource}; +use rtfm::{C2, C3, P0, P2, Resource, T2}; static R1: Resource<(), C3> = Resource::new(()); -fn j1(prio: P2, ceil: C2) { - let c3 = ceil.raise( - &R1, |ceil| { +fn j1(prio: P2, thr: T2) { + let t3 = thr.raise( + &R1, |thr| { // forbidden: ceiling token can't outlive the critical section - ceil //~ error + thr //~ error } ); // Would be bad: lockless access to a resource with ceiling = 3 - let r2 = R1.access(&prio, c3); + let r2 = R1.access(&prio, t3); } fn j2(prio: P0) { -- cgit v1.2.3