diff options
| author | Jorge Aparicio <jorge@japaric.io> | 2017-04-21 15:31:02 -0500 |
|---|---|---|
| committer | Jorge Aparicio <jorge@japaric.io> | 2017-04-21 15:31:02 -0500 |
| commit | 3e165f2a42b8f3c66e3e77742a54feb875ec4bd6 (patch) | |
| tree | 40fed29e8d94ac1d3b678ad3617a8e957e679f3c /tests/cfail/ceiling.rs | |
| parent | 854939fc6b523479a7540d8ac9d0933d9c3dcb78 (diff) | |
drop `lock` methods, add `raise_to` function
Diffstat (limited to 'tests/cfail/ceiling.rs')
| -rw-r--r-- | tests/cfail/ceiling.rs | 6 |
1 files changed, 4 insertions, 2 deletions
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 |
