From 2d80f3631bc3bf382ae24c25dbf8ff33af2ad430 Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Sat, 29 Jul 2017 00:34:00 -0500 Subject: update examples --- src/examples/_3_preemption.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/examples/_3_preemption.rs') diff --git a/src/examples/_3_preemption.rs b/src/examples/_3_preemption.rs index 1f6b244..9dc8983 100644 --- a/src/examples/_3_preemption.rs +++ b/src/examples/_3_preemption.rs @@ -2,7 +2,6 @@ //! //! ``` //! #![deny(unsafe_code)] -//! #![feature(const_fn)] //! #![feature(proc_macro)] //! #![no_std] //! @@ -60,8 +59,11 @@ //! // As this task runs at lower priority it needs a critical section to //! // prevent `sys_tick` from preempting it while it modifies this resource //! // data. The critical section is required to prevent data races which can -//! // lead to undefined behavior -//! r.COUNTER.claim_mut(t, |counter, _t| { **counter += 1; }); +//! // lead to undefined behavior. +//! r.COUNTER.claim_mut(t, |counter, _t| { +//! // `claim_mut` creates a critical section +//! **counter += 1; +//! }); //! //! // .. //! } -- cgit v1.2.3