mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 15:04:32 +01:00
use hw ceilings in checked::Resource.lock{,mut}
This commit is contained in:
parent
f2bab47aa4
commit
f875cfcb5c
1 changed files with 2 additions and 2 deletions
|
@ -56,7 +56,7 @@ where
|
||||||
F: FnOnce(&T) -> R,
|
F: FnOnce(&T) -> R,
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
let old_basepri = acquire(&self.locked, C::ceiling());
|
let old_basepri = acquire(&self.locked, C::hw_ceiling());
|
||||||
::compiler_barrier();
|
::compiler_barrier();
|
||||||
let ret = f(&*self.data.get());
|
let ret = f(&*self.data.get());
|
||||||
::compiler_barrier();
|
::compiler_barrier();
|
||||||
|
@ -72,7 +72,7 @@ where
|
||||||
F: FnOnce(&mut T) -> R,
|
F: FnOnce(&mut T) -> R,
|
||||||
{
|
{
|
||||||
unsafe {
|
unsafe {
|
||||||
let old_basepri = acquire(&self.locked, C::ceiling());
|
let old_basepri = acquire(&self.locked, C::hw_ceiling());
|
||||||
::compiler_barrier();
|
::compiler_barrier();
|
||||||
let ret = f(&mut *self.data.get());
|
let ret = f(&mut *self.data.get());
|
||||||
::compiler_barrier();
|
::compiler_barrier();
|
||||||
|
|
Loading…
Reference in a new issue