From 22bb0d8eaef26dc9f276b89b85f20121a372197f Mon Sep 17 00:00:00 2001 From: Jorge Aparicio Date: Fri, 7 Apr 2017 18:48:33 -0500 Subject: [PATCH] removed global critical section from checked::release --- src/checked.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/checked.rs b/src/checked.rs index 22890d08eb..eb0da3d7fe 100644 --- a/src/checked.rs +++ b/src/checked.rs @@ -21,12 +21,13 @@ unsafe fn acquire(locked: &UnsafeCell, ceiling: u8) -> u8 { } unsafe fn release(locked: &UnsafeCell, old_basepri: u8) { - interrupt::free( - |_| { - basepri::write(old_basepri); + // XXX Is it really memory safe to *not* use a global critical section here + // interrupt::free( + // |_| { *locked.get() = false; - }, - ); + basepri::write(old_basepri); + // }, + // ); } /// A totally safe `Resource` that panics on misuse