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 }