mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 12:12:50 +01:00
removed global critical section from checked::release
This commit is contained in:
parent
f875cfcb5c
commit
22bb0d8eae
1 changed files with 6 additions and 5 deletions
|
@ -21,12 +21,13 @@ unsafe fn acquire(locked: &UnsafeCell<bool>, ceiling: u8) -> u8 {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn release(locked: &UnsafeCell<bool>, old_basepri: u8) {
|
unsafe fn release(locked: &UnsafeCell<bool>, old_basepri: u8) {
|
||||||
interrupt::free(
|
// XXX Is it really memory safe to *not* use a global critical section here
|
||||||
|_| {
|
// interrupt::free(
|
||||||
basepri::write(old_basepri);
|
// |_| {
|
||||||
*locked.get() = false;
|
*locked.get() = false;
|
||||||
},
|
basepri::write(old_basepri);
|
||||||
);
|
// },
|
||||||
|
// );
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A totally safe `Resource` that panics on misuse
|
/// A totally safe `Resource` that panics on misuse
|
||||||
|
|
Loading…
Reference in a new issue