diff options
author | 2018-01-11 19:57:17 +0000 | |
---|---|---|
committer | 2018-01-11 19:57:17 +0000 | |
commit | 34edc41e9289e83468f68663a7f4a7f0f6cc2797 (patch) | |
tree | 128911a00f60bb7c0dc9c6ceb8c87e80e3935a99 /src/examples/_3_preemption.rs | |
parent | dd12a6a14d2bb028c8da96cb510b67de31d28be4 (diff) | |
parent | 1be43fc489993e63577515063ceb8a83b14423b8 (diff) | |
download | rtic-release/v0.2.tar.gz rtic-release/v0.2.tar.zst rtic-release/v0.2.zip |
Auto merge of #63 - japaric:cortex-m-up, r=japaricrelease/v0.2
adapt to changes in the cortex-m crate
None
Diffstat (limited to 'src/examples/_3_preemption.rs')
-rw-r--r-- | src/examples/_3_preemption.rs | 7 |
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; //! }); //! //! // .. |