diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2017-04-19 17:21:13 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2017-04-19 17:21:13 -0500 |
| commit | 4e6818eb2cd396dde39f05bd85628326b0492fe9 (patch) | |
| tree | 9277315d815c92160ebe05a6589d29838bd6f3d4 /tests/cfail/lock.rs | |
| parent | 0827c40a265adc4ffc143e96ecb5627618b2f68e (diff) | |
remove claim, add Priority.as_ceiling
Diffstat (limited to 'tests/cfail/lock.rs')
| -rw-r--r-- | tests/cfail/lock.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/cfail/lock.rs b/tests/cfail/lock.rs index 6b1a411..83f3ec8 100644 --- a/tests/cfail/lock.rs +++ b/tests/cfail/lock.rs @@ -11,13 +11,13 @@ fn j1(prio: P3) { } // DON'T lock a resource with ceiling equal to the task priority. -// Instead use `claim` +// Instead use `borrow` fn j2(prio: P2) { R1.lock(&prio, |_, _| {}); //~^ error // OK - let r1 = R1.claim(&prio); + let r1 = R1.borrow(&prio, prio.as_ceiling()); } // You CAN lock a resource with ceiling C from a task with priority P if C > P @@ -37,5 +37,5 @@ fn j4(prio: P1) { // Only tasks with priority P16 can claim a resource with ceiling C16 fn j5(prio: P16) { // OK - let r2 = R2.claim(&prio); + let r2 = R2.borrow(&prio, prio.as_ceiling()); } |
