]> granicus.if.org Git - esp-idf/commitdiff
task priority: modify lwip/wifi/event task priority
authorliuzhifu <liuzhifu@espressif.com>
Wed, 31 Aug 2016 11:38:43 +0000 (19:38 +0800)
committerWu Jian Gang <wujiangang@espressif.com>
Wed, 14 Sep 2016 03:59:25 +0000 (11:59 +0800)
1. Modify lwip core task priority to configMAX_PRIORITIES-7
2. Modify wifi startup task priority to configMAX_PRIORITIES-7
3. Modify event task priority to configMAX_PRIORITIES-4

components/esp32/event.c
components/esp32/wifi.c
components/lwip/include/lwip/port/lwipopts.h

index 53ffd642eb416951ba3a07536c0ddf3854cc67b1..366d0371f298bd5de136deb4a986ad180ab635bf 100644 (file)
@@ -359,7 +359,7 @@ esp_err_t esp_event_init(system_event_cb_t cb, void *ctx)
 
     g_event_handler = xQueueCreate(CONFIG_WIFI_ENENT_QUEUE_SIZE, sizeof(system_event_t));
 
-    xTaskCreatePinnedToCore(esp_system_event_task, "eventTask", CONFIG_WIFI_EVENT_TASK_STACK_SIZE, NULL, 5, NULL, 0); // TODO: rearrange task priority
+    xTaskCreatePinnedToCore(esp_system_event_task, "eventTask", CONFIG_WIFI_EVENT_TASK_STACK_SIZE, NULL, configMAX_PRIORITIES-4, NULL, 0);
     return ESP_OK;
 }
 
index 9900069759296b5dc1adcef0020e846e6b1718ba..a9d8981012223b07ff2a1e1a45ad091b8515f23b 100644 (file)
@@ -107,7 +107,7 @@ esp_err_t esp_wifi_startup(wifi_startup_cb_t cb, void *ctx)
     startup_cb = cb;
     startup_ctx = ctx;
 
-    xTaskCreatePinnedToCore(esp_wifi_task, "wifiTask", 4096, NULL, 5, NULL, 0);// TODO: rearrange task priority
+    xTaskCreatePinnedToCore(esp_wifi_task, "wifiTask", 4096, NULL, configMAX_PRIORITIES-7, NULL, 0);
 
     return ESP_OK;
 }
index 26d3c8dcbd423bc11b4e309ffee15f551d18ad56..9fe047faba1cc5944f287bbb0105a650ec07c5f6 100755 (executable)
@@ -330,7 +330,7 @@ extern unsigned char misc_prof_get_tcp_snd_buf(void);
  * The priority value itself is platform-dependent, but is passed to
  * sys_thread_new() when the thread is created.
  */
-#define TCPIP_THREAD_PRIO               (configMAX_PRIORITIES-5)
+#define TCPIP_THREAD_PRIO               (configMAX_PRIORITIES-7)
 
 /**
  * TCPIP_MBOX_SIZE: The mailbox size for the tcpip thread messages