mm: don't do mm_checkcorruption in IRQ
because this not safe in SMP mode Change-Id: Ifaf49818c51ee4283f0e280ae3e4e23cbd0dba08 Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
parent
68d66148ad
commit
6685df498f
1 changed files with 2 additions and 12 deletions
|
@ -74,14 +74,7 @@ void mm_checkcorruption(FAR struct mm_heap_s *heap)
|
||||||
|
|
||||||
if (up_interrupt_context())
|
if (up_interrupt_context())
|
||||||
{
|
{
|
||||||
if (heap_impl->mm_counts_held)
|
return;
|
||||||
{
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
|
||||||
continue;
|
|
||||||
#else
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (sched_idletask())
|
else if (sched_idletask())
|
||||||
{
|
{
|
||||||
|
@ -125,9 +118,6 @@ void mm_checkcorruption(FAR struct mm_heap_s *heap)
|
||||||
|
|
||||||
assert(node == heap_impl->mm_heapend[region]);
|
assert(node == heap_impl->mm_heapend[region]);
|
||||||
|
|
||||||
if (!up_interrupt_context())
|
mm_givesemaphore(heap);
|
||||||
{
|
|
||||||
mm_givesemaphore(heap);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue