From 5e83dc295e020b635863c003a614f9fb895daa9a Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Thu, 27 Jul 2017 14:59:31 -0500 Subject: [PATCH] fix warning on ARMv6-M --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index ba96762341..b1cc0bdb49 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -101,7 +101,6 @@ pub unsafe fn claim( where F: FnOnce(T, &mut Threshold) -> R, { - let max_priority = 1 << nvic_prio_bits; if ceiling > t.value() { match () { #[cfg(armv6m)] @@ -109,6 +108,8 @@ where #[cfg(not(armv6m))] () => { + let max_priority = 1 << nvic_prio_bits; + if ceiling == max_priority { atomic(t, |t| f(data, t)) } else {