From a31a9a7a7e87b428ebaecaabdd00e58ff22f1b06 Mon Sep 17 00:00:00 2001 From: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> Date: Fri, 19 Jan 2024 23:39:10 +0800 Subject: [PATCH] Update tasks.c comment --- tasks.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/tasks.c b/tasks.c index 83ccbbf702..6d27f2f5e4 100644 --- a/tasks.c +++ b/tasks.c @@ -2291,7 +2291,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode, if( pxTCB == pxCurrentTCB ) { configASSERT( uxSchedulerSuspended == 0 ); - portYIELD_WITHIN_API(); + taskYIELD_WITHIN_API(); } else { @@ -2300,9 +2300,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode, } #else /* #if ( configNUMBER_OF_CORES == 1 ) */ { - /* Rescheduling a running task is handled differently if it is running - * on core other than current core. Checking a task running core needs - * to be performed in critical section. */ + /* Checking running state of a task needs to be performed in + * critical section. */ taskENTER_CRITICAL(); { if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) @@ -2310,7 +2309,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode, if( pxTCB->xTaskRunState == ( BaseType_t ) portGET_CORE_ID() ) { configASSERT( uxSchedulerSuspended == 0 ); - vTaskYieldWithinAPI(); + taskYIELD_WITHIN_API(); } else {