diff options
Diffstat (limited to '')
-rw-r--r-- | examples/preemption.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/preemption.rs b/examples/preemption.rs index 98dde8d1..8e501887 100644 --- a/examples/preemption.rs +++ b/examples/preemption.rs @@ -42,12 +42,12 @@ fn idle() -> ! { } } -fn sys_tick(_t: &mut Threshold, r: SYS_TICK::Resources) { +fn sys_tick(_t: &mut Threshold, mut r: SYS_TICK::Resources) { // .. // This task can't be preempted by `tim2` so it has direct access to the // resource data - **r.COUNTER += 1; + *r.COUNTER += 1; // .. } @@ -61,7 +61,7 @@ fn tim2(t: &mut Threshold, mut r: TIM2::Resources) { // lead to undefined behavior. r.COUNTER.claim_mut(t, |counter, _t| { // `claim_mut` creates a critical section - **counter += 1; + *counter += 1; }); // .. |