mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-14 14:06:54 +00:00
HTTP Server: Added ability to select core
The task that runs the HTTP server can now be pinned to a particular core by setting `core_id` in the HTTP server configuration. By default, the core is set to `tskNO_AFFINITY`, meaning it can run on any core. Merges https://github.com/espressif/esp-idf/pull/3190
This commit is contained in:

committed by
Mahavir Jain

parent
c1e5e19d0b
commit
7f1047847a
@@ -363,7 +363,8 @@ esp_err_t httpd_start(httpd_handle_t *handle, const httpd_config_t *config)
|
||||
if (httpd_os_thread_create(&hd->hd_td.handle, "httpd",
|
||||
hd->config.stack_size,
|
||||
hd->config.task_priority,
|
||||
httpd_thread, hd) != ESP_OK) {
|
||||
httpd_thread, hd,
|
||||
hd->config.core_id) != ESP_OK) {
|
||||
/* Failed to launch task */
|
||||
httpd_delete(hd);
|
||||
return ESP_ERR_HTTPD_TASK;
|
||||
|
Reference in New Issue
Block a user