mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Assert when a new task is started on a nonexisting CPU
This commit is contained in:
parent
8131c77860
commit
aaeb2bd110
@ -1044,6 +1044,11 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB, TaskFunction_t pxTaskCode
|
||||
{
|
||||
TCB_t *curTCB, *tcb0, *tcb1;
|
||||
|
||||
/* Assure that xCoreID is valid or we'll have an out-of-bounds on pxCurrentTCB
|
||||
You will assert here if e.g. you only have one CPU enabled in menuconfig and
|
||||
are trying to start a task on core 1. */
|
||||
configASSERT( xCoreID == tskNO_AFFINITY || xCoreID < portNUM_PROCESSORS);
|
||||
|
||||
/* Ensure interrupts don't access the task lists while the lists are being
|
||||
updated. */
|
||||
taskENTER_CRITICAL(&xTaskQueueMutex);
|
||||
|
Loading…
Reference in New Issue
Block a user