change(components/esp_http_server): add task_caps configuration

The HTTP server is not a critical component, it would be nice if we can
control the task caps by using configuration.

Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Harshit Malpani <harshit.malpani@espressif.com>
This commit is contained in:
Alon Bar-Lev
2023-10-31 20:59:13 +02:00
committed by Harshit Malpani
parent 1b822573b6
commit af79fe0495
5 changed files with 9 additions and 5 deletions

View File

@@ -25,9 +25,9 @@ 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,
BaseType_t core_id)
BaseType_t core_id, uint32_t caps)
{
int ret = xTaskCreatePinnedToCore(thread_routine, name, stacksize, arg, prio, thread, core_id);
int ret = xTaskCreatePinnedToCoreWithCaps(thread_routine, name, stacksize, arg, prio, thread, core_id, caps);
if (ret == pdPASS) {
return OS_SUCCESS;
}
@@ -37,7 +37,7 @@ static inline int httpd_os_thread_create(othread_t *thread,
/* Only self delete is supported */
static inline void httpd_os_thread_delete(void)
{
vTaskDelete(xTaskGetCurrentTaskHandle());
vTaskDeleteWithCaps(xTaskGetCurrentTaskHandle());
}
static inline void httpd_os_thread_sleep(int msecs)