mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/freertos_smp_main_task_affinity' into 'master'
freertos: Fix main task affinity in SMP FreeRTOS See merge request espressif/esp-idf!17787
This commit is contained in:
commit
2fda413674
@ -228,16 +228,9 @@ void esp_startup_start_app_common(void)
|
||||
esp_gdbstub_init();
|
||||
#endif // CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME
|
||||
|
||||
TaskHandle_t main_task_hdl;
|
||||
portDISABLE_INTERRUPTS();
|
||||
portBASE_TYPE res = xTaskCreatePinnedToCore(main_task, "main",
|
||||
ESP_TASK_MAIN_STACK, NULL,
|
||||
ESP_TASK_MAIN_PRIO, &main_task_hdl, ESP_TASK_MAIN_CORE);
|
||||
#if ( configUSE_CORE_AFFINITY == 1 && configNUM_CORES > 1 )
|
||||
//We only need to set affinity when using dual core with affinities supported
|
||||
vTaskCoreAffinitySet(main_task_hdl, 1 << 1);
|
||||
#endif
|
||||
portENABLE_INTERRUPTS();
|
||||
ESP_TASK_MAIN_PRIO, NULL, ESP_TASK_MAIN_CORE);
|
||||
assert(res == pdTRUE);
|
||||
(void)res;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user