Xtensa ESP32: Make sure that SMP configuratin still builds without errors.

This commit is contained in:
Gregory Nutt 2016-12-19 14:12:19 -06:00
parent e61549d8b9
commit e5182acbe3
4 changed files with 7 additions and 3 deletions

View File

@ -164,6 +164,7 @@ int up_cpu_paused(int cpu)
}
spin_unlock(&g_cpu_wait[cpu]);
return OK;
}
/****************************************************************************

View File

@ -53,6 +53,8 @@
#include "esp32_cpuint.h"
#include "xtensa.h"
#include "sched/sched.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/

View File

@ -42,6 +42,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <semaphore.h>
#include <errno.h>
#include <debug.h>
#include <nuttx/arch.h>

View File

@ -86,7 +86,7 @@ static int esp32_fromcpu_interrupt(int fromcpu)
int intcode;
int tocpu;
DEBUGASSERT(regs != NULL);
DEBUGASSERT((unsigned)fromcpu < CONFIG_SMP_NCPUS);
/* Clear the interrupt from the other CPU */
@ -155,8 +155,8 @@ int xtensa_intercpu_interrupt(int tocpu, int intcode)
{
int fromcpu;
DEBUGASSERT((unsigned)cpu < CONFIG_SMP_NCPUS &&
(unsigned)incode <= UINT8_MAX);
DEBUGASSERT((unsigned)tocpu < CONFIG_SMP_NCPUS &&
(unsigned)intcode <= UINT8_MAX);
/* Disable context switching so that some other thread does not attempt to
* take the spinlock on the same CPU.