From 6577f4a91aef8ea2626448d6b7985126f648b5db Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 20 Jul 2017 16:13:02 -0500 Subject: [PATCH] bump cortex-m version to v0.3.1 barrier! is no longer needed --- Cargo.toml | 2 +- src/lib.rs | 9 --------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 443ba4271b..d36b81e965 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/japaric/cortex-m-rtfm" version = "0.2.0" [dependencies] -cortex-m = "0.3.0" +cortex-m = "0.3.1" static-ref = "0.2.0" [dependencies.cortex-m-rtfm-macros] diff --git a/src/lib.rs b/src/lib.rs index 26bc2bd0ff..6ee98d79f6 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -19,13 +19,6 @@ use cortex_m::interrupt::Nr; #[cfg(not(armv6m))] use cortex_m::register::{basepri_max, basepri}; -#[cfg(not(armv6m))] -macro_rules! barrier { - () => { - asm!("" ::: "memory" : "volatile"); - } -} - #[inline(always)] unsafe fn claim( data: T, @@ -54,9 +47,7 @@ where let old = basepri::read(); let hw = (max_priority - ceiling) << (8 - nvic_prio_bits); basepri_max::write(hw); - barrier!(); let ret = f(g(data), &mut Threshold(ceiling)); - barrier!(); basepri::write(old); ret }