aboutsummaryrefslogtreecommitdiff
path: root/src/examples/_3_preemption.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/examples/_3_preemption.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/examples/_3_preemption.rs b/src/examples/_3_preemption.rs
index 9dc8983b..4360185a 100644
--- a/src/examples/_3_preemption.rs
+++ b/src/examples/_3_preemption.rs
@@ -2,6 +2,7 @@
//!
//! ```
//! #![deny(unsafe_code)]
+//! #![deny(warnings)]
//! #![feature(proc_macro)]
//! #![no_std]
//!
@@ -43,12 +44,12 @@
//! }
//! }
//!
-//! 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;
//!
//! // ..
//! }
@@ -62,7 +63,7 @@
//! // lead to undefined behavior.
//! r.COUNTER.claim_mut(t, |counter, _t| {
//! // `claim_mut` creates a critical section
-//! **counter += 1;
+//! *counter += 1;
//! });
//!
//! // ..