change(freertos/idf): Deprecate some FreeRTOS IDF addition functions

This commit deprecates xTaskGetAffinity(), xTaskGetCurrentTaskHandleForCPU()
and xTaskGetIdleTaskHandleForCPU() APIs for IDF-FreeRTOS kernel.
Instead, users are directed to use alternatives. All other
components in IDF using these functions have been updated accordingly.
This commit is contained in:
Sudeep Mohanty
2023-11-02 11:19:42 +01:00
parent c8cae65f45
commit d38f100223
12 changed files with 43 additions and 43 deletions

View File

@@ -925,14 +925,14 @@ static int get_task_cpu_id(size_t index)
if (!get_task_handle(index, &handle)) {
return -1;
}
BaseType_t core_id = xTaskGetAffinity(handle);
BaseType_t core_id = xTaskGetCoreID(handle);
return (int)core_id;
}
/** Get the index of the task running on the current CPU, and save the result */
static void find_paniced_task_index(void)
{
TaskHandle_t cur_handle = (TaskHandle_t)xTaskGetCurrentTaskHandleForCPU(xPortGetCoreID());
TaskHandle_t cur_handle = (TaskHandle_t)xTaskGetCurrentTaskHandleForCore(xPortGetCoreID());
TaskHandle_t handle;
for (int i = 0; i < s_scratch.task_count; i++) {
if (get_task_handle(i, &handle) && cur_handle == handle) {