mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
arch assertions: Correct duplicated logic from commit dbf01d12b7. Checking for PID == zero is not a valid way to test for the IDLE task in all configurations! This is only true in the single CPU configuration. In multiple CPU configurations, there will be a separate IDLE task for each CPU with a different PID.
This commit is contained in:
@@ -255,7 +255,7 @@ static void _up_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (g_current_regs || (running_task())->pid == 0)
|
||||
if (g_current_regs || (running_task())->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (;;)
|
||||
|
||||
Reference in New Issue
Block a user