mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
mm: idle check heap use mm_trysemaphore
Change-Id: I92e1df572fa6cd801b10e5b06e7b04d450b3e3fb Signed-off-by: ligd <liguiding1@xiaomi.com> (cherry picked from commit bc9a5d1ca9656f6effd3a419cc2488586dfb1489)
This commit is contained in:
@@ -805,19 +805,20 @@ void nx_start(void)
|
||||
|
||||
/* Check stack in idle thread */
|
||||
|
||||
flags = enter_critical_section();
|
||||
|
||||
for (i = 0; i < CONFIG_MAX_TASKS && g_pidhash[i].tcb; i++)
|
||||
{
|
||||
flags = enter_critical_section();
|
||||
|
||||
if (up_check_tcbstack_remain(g_pidhash[i].tcb) <= 0)
|
||||
{
|
||||
_alert("Stack check failed, pid %d, name %s\n",
|
||||
g_pidhash[i].tcb->pid, g_pidhash[i].tcb->name);
|
||||
PANIC();
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
}
|
||||
|
||||
leave_critical_section(flags);
|
||||
#endif
|
||||
|
||||
/* Check heap in idle thread */
|
||||
|
||||
Reference in New Issue
Block a user