diff options
author | 2017-07-20 23:03:45 -0500 | |
---|---|---|
committer | 2017-07-20 23:03:45 -0500 | |
commit | 0788a15a39599dece96ba5d2f8cb15c7e397939a (patch) | |
tree | 26cc2687685b51d66275305699b0f06d82579179 /examples | |
parent | c7b9507a57f2ba28c18b15dd2719a1c56f74a302 (diff) | |
download | rtic-0788a15a39599dece96ba5d2f8cb15c7e397939a.tar.gz rtic-0788a15a39599dece96ba5d2f8cb15c7e397939a.tar.zst rtic-0788a15a39599dece96ba5d2f8cb15c7e397939a.zip |
update CI
Diffstat (limited to 'examples')
-rw-r--r-- | examples/nested.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/nested.rs b/examples/nested.rs index d307634c..fda2a7d4 100644 --- a/examples/nested.rs +++ b/examples/nested.rs @@ -63,6 +63,9 @@ task!(EXTI0, exti0); fn exti0(t: &mut Threshold, r: EXTI0::Resources) { // because this task has a priority of 1 the preemption threshold is also 1 + let mut low = r.LOW; + let mut high = r.HIGH; + // A rtfm::bkpt(); @@ -70,7 +73,7 @@ fn exti0(t: &mut Threshold, r: EXTI0::Resources) { rtfm::set_pending(Interrupt::EXTI1); // ~> exti1 // a claim creates a critical section - r.LOW.claim_mut(t, |_low, t| { + low.claim_mut(t, |_low, t| { // this claim increases the preemption threshold to 2 // just high enough to not race with task `exti1` for access to the // `LOW` resource @@ -90,7 +93,7 @@ fn exti0(t: &mut Threshold, r: EXTI0::Resources) { rtfm::bkpt(); // claims can be nested - r.HIGH.claim_mut(t, |_high, _| { + high.claim_mut(t, |_high, _| { // This claim increases the preemption threshold to 3 // now `exti2` can't preempt this task |