Closed
Description
The new allocator uses a spin-lock to synchronize the access to the ALLOCATOR
(LockedHeap).
Following sequence can result in a deadlock:
ISR1
is entering the lock.ISR1
is preempted.ISR2
has higher priority and tries to access the lock. Scine the lock is already entered byISR1
,ISR2
has to wait in a loop untilISR1
has left the lock.
ISR1
and ISR2
don't make progress => Deadlock
Solution: Use the PRIMASK register on cortex m processors to synchronize the critical section by disabling interrutps.
See pull request for CortexMHeap
rust-embedded/embedded-alloc#6
Metadata
Metadata
Assignees
Labels
No labels