SMP: Fix typos in some conditional compilation

This commit is contained in:
Gregory Nutt 2016-11-24 17:59:45 -06:00
parent 7f636f2280
commit b08fb33c28
2 changed files with 11 additions and 4 deletions

View File

@ -346,14 +346,21 @@ static void _up_assert(int errorcode)
if (CURRENT_REGS || this_task()->pid == 0) if (CURRENT_REGS || this_task()->pid == 0)
{ {
/* Disable interrupts on this CPU */
(void)up_irq_save(); (void)up_irq_save();
#ifdef SMP
(void)spin_trylock(&g_cpu_irqlock);
#endif
for (; ; ) for (; ; )
{ {
#ifdef CONFIG_SMP
/* Try (again) to stop activity on other CPUs */
(void)spin_trylock(&g_cpu_irqlock);
#endif
#ifdef CONFIG_ARCH_LEDS #ifdef CONFIG_ARCH_LEDS
/* FLASH LEDs a 2Hz */
board_autoled_on(LED_PANIC); board_autoled_on(LED_PANIC);
up_mdelay(250); up_mdelay(250);
board_autoled_off(LED_PANIC); board_autoled_off(LED_PANIC);

View File

@ -146,7 +146,7 @@ void _exit(int status)
*/ */
(void)up_irq_save(); (void)up_irq_save();
#ifdef SMP #ifdef CONFIG_SMP
(void)spin_trylock(&g_cpu_irqlock); (void)spin_trylock(&g_cpu_irqlock);
#endif #endif