aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml2
-rw-r--r--src/lib.rs9
2 files changed, 1 insertions, 10 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 443ba427..d36b81e9 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 26bc2bd0..6ee98d79 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<T, U, R, F, G>(
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
}