arch assertions: Correct duplicated logic from commit dbf01d12b7321d1b48b68d3b69842a853b049376. 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:
parent
a9626f3ad3
commit
ec9265aa95
@ -310,7 +310,7 @@ static void _up_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (CURRENT_REGS || running_task()->pid == 0)
|
||||
if (CURRENT_REGS || running_task()->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (; ; )
|
||||
|
@ -367,7 +367,7 @@ static void _up_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (CURRENT_REGS || running_task()->pid == 0)
|
||||
if (CURRENT_REGS || running_task()->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (; ; )
|
||||
|
@ -395,7 +395,7 @@ static void _up_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (CURRENT_REGS || running_task()->pid == 0)
|
||||
if (CURRENT_REGS || running_task()->flink == NULL)
|
||||
{
|
||||
/* Disable interrupts on this CPU */
|
||||
|
||||
|
@ -389,7 +389,7 @@ static void _up_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (CURRENT_REGS || (running_task())->pid == 0)
|
||||
if (CURRENT_REGS || (running_task())->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (; ; )
|
||||
|
@ -374,7 +374,7 @@ static void _up_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (CURRENT_REGS || (running_task())->pid == 0)
|
||||
if (CURRENT_REGS || (running_task())->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (; ; )
|
||||
|
@ -87,7 +87,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 (; ; )
|
||||
|
@ -294,7 +294,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 (;;)
|
||||
|
@ -86,7 +86,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 (; ; )
|
||||
|
@ -87,7 +87,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 (; ; )
|
||||
|
@ -372,7 +372,7 @@ static void _up_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (CURRENT_REGS || running_task()->pid == 0)
|
||||
if (CURRENT_REGS || running_task()->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (; ; )
|
||||
|
@ -88,7 +88,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 (;;)
|
||||
|
@ -87,7 +87,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 (; ; )
|
||||
|
@ -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 (;;)
|
||||
|
@ -126,7 +126,7 @@ static void xtensa_assert(int errorcode)
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (CURRENT_REGS || running_task()->pid == 0)
|
||||
if (CURRENT_REGS || running_task()->flink == NULL)
|
||||
{
|
||||
/* Blink the LEDs forever */
|
||||
|
||||
|
@ -87,7 +87,7 @@ static void _up_assert(int errorcode) /* noreturn_function */
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (up_interrupt_context() || running_task()->pid == 0)
|
||||
if (up_interrupt_context() || running_task()->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (;;)
|
||||
|
@ -86,7 +86,7 @@ static void _up_assert(int errorcode) /* noreturn_function */
|
||||
|
||||
/* Are we in an interrupt handler or the idle task? */
|
||||
|
||||
if (up_interrupt_context() || running_task()->pid == 0)
|
||||
if (up_interrupt_context() || running_task()->flink == NULL)
|
||||
{
|
||||
(void)up_irq_save();
|
||||
for (;;)
|
||||
|
Loading…
x
Reference in New Issue
Block a user