mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-16 06:54:22 +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
@@ -32,9 +32,10 @@ typedef TaskHandle_t othread_t;
|
||||
|
||||
static inline int httpd_os_thread_create(othread_t *thread,
|
||||
const char *name, uint16_t stacksize, int prio,
|
||||
void (*thread_routine)(void *arg), void *arg)
|
||||
void (*thread_routine)(void *arg), void *arg,
|
||||
BaseType_t core_id)
|
||||
{
|
||||
int ret = xTaskCreate(thread_routine, name, stacksize, arg, prio, thread);
|
||||
int ret = xTaskCreatePinnedToCore(thread_routine, name, stacksize, arg, prio, thread, core_id);
|
||||
if (ret == pdPASS) {
|
||||
return OS_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user