use hw ceilings in checked::Resource.lock{,mut}

This commit is contained in:
Jorge Aparicio 2017-04-07 18:18:37 -05:00
parent f2bab47aa4
commit f875cfcb5c

View file

@ -56,7 +56,7 @@ where
F: FnOnce(&T) -> R,
{
unsafe {
let old_basepri = acquire(&self.locked, C::ceiling());
let old_basepri = acquire(&self.locked, C::hw_ceiling());
::compiler_barrier();
let ret = f(&*self.data.get());
::compiler_barrier();
@ -72,7 +72,7 @@ where
F: FnOnce(&mut T) -> R,
{
unsafe {
let old_basepri = acquire(&self.locked, C::ceiling());
let old_basepri = acquire(&self.locked, C::hw_ceiling());
::compiler_barrier();
let ret = f(&mut *self.data.get());
::compiler_barrier();