mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
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:
@@ -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)
|
|
||||||
{
|
|
||||||
#if CONFIG_MM_REGIONS > 1
|
|
||||||
continue;
|
|
||||||
#else
|
|
||||||
return;
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user