mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
lwip: allow setting LwIP tasks affinity via sdkconfig
In some cases applications need to ensure that WiFi/BT related tasks run on CPU1. This option can be used to set task affinity in such case. https://github.com/espressif/esp-idf/issues/2233#issuecomment-409220381
This commit is contained in:
@@ -426,16 +426,17 @@ sys_mbox_free(sys_mbox_t *mbox)
|
||||
sys_thread_t
|
||||
sys_thread_new(const char *name, lwip_thread_fn thread, void *arg, int stacksize, int prio)
|
||||
{
|
||||
xTaskHandle CreatedTask;
|
||||
xTaskHandle created_task;
|
||||
portBASE_TYPE result;
|
||||
|
||||
result = xTaskCreate(thread, name, stacksize, arg, prio, &CreatedTask);
|
||||
result = xTaskCreatePinnedToCore(thread, name, stacksize, arg, prio, &created_task,
|
||||
CONFIG_TCPIP_TASK_AFFINITY);
|
||||
|
||||
if (result == pdPASS) {
|
||||
return CreatedTask;
|
||||
} else {
|
||||
if (result != pdPASS) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return created_task;
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------------------------*/
|
||||
|
Reference in New Issue
Block a user