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

@@ -107,7 +107,7 @@ typedef struct {
static void task_report_corenum(void *arg)
{
report_corenum_info_t *info = (report_corenum_info_t*) arg;
info->recorded_core_num = xTaskGetAffinity(NULL);
info->recorded_core_num = xTaskGetCoreID(NULL);
xTaskNotifyGive(info->parent_handle);
vTaskSuspend(NULL);
}

View File

@@ -595,7 +595,7 @@ static void test_pended_running_task(void *arg)
// While tasks which do not have affinity to the current core are unblocked.
for (int i = 0; i < TEST_PENDED_NUM_BLOCKED_TASKS; i++) {
// Note: We use eBlocked instead of eReady due to a bug in eTaskGetState(). See (IDF-5543)
if (xTaskGetAffinity(blkd_tsks[i]) == xPortGetCoreID()) {
if (xTaskGetCoreID(blkd_tsks[i]) == xPortGetCoreID()) {
TEST_ASSERT_EQUAL(eBlocked, eTaskGetState(blkd_tsks[i]));
TEST_ASSERT_EQUAL(false, has_run[i]);
} else {

View File

@@ -119,7 +119,7 @@ static void unpinned_task(void *arg)
#if CONFIG_FREERTOS_SMP
TEST_ASSERT_EQUAL(tskNO_AFFINITY, vTaskCoreAffinityGet(NULL));
#else
TEST_ASSERT_EQUAL(tskNO_AFFINITY, xTaskGetAffinity(NULL));
TEST_ASSERT_EQUAL(tskNO_AFFINITY, xTaskGetCoreID(NULL));
#endif
#endif // !CONFIG_FREERTOS_UNICORE
@@ -136,7 +136,7 @@ static void unpinned_task(void *arg)
#if CONFIG_FREERTOS_SMP
TEST_ASSERT_EQUAL(tskNO_AFFINITY, vTaskCoreAffinityGet(NULL));
#else
TEST_ASSERT_EQUAL(tskNO_AFFINITY, xTaskGetAffinity(NULL));
TEST_ASSERT_EQUAL(tskNO_AFFINITY, xTaskGetCoreID(NULL));
#endif
#endif // !CONFIG_FREERTOS_UNICORE
// Reenable scheduling/preemption

View File

@@ -141,7 +141,7 @@ static void unpinned_task(void *arg)
#if CONFIG_FREERTOS_SMP
TEST_ASSERT_EQUAL(tskNO_AFFINITY, vTaskCoreAffinityGet(NULL));
#else
TEST_ASSERT_EQUAL(tskNO_AFFINITY, xTaskGetAffinity(NULL));
TEST_ASSERT_EQUAL(tskNO_AFFINITY, xTaskGetCoreID(NULL));
#endif
#endif // !CONFIG_FREERTOS_UNICORE
@@ -162,7 +162,7 @@ static void unpinned_task(void *arg)
#if CONFIG_FREERTOS_SMP
TEST_ASSERT_EQUAL(1 << cur_core_num, vTaskCoreAffinityGet(NULL));
#else
TEST_ASSERT_EQUAL(cur_core_num, xTaskGetAffinity(NULL));
TEST_ASSERT_EQUAL(cur_core_num, xTaskGetCoreID(NULL));
#endif
#endif // !CONFIG_FREERTOS_UNICORE
// Reenable scheduling/preemption