Skip to content

Commit

Permalink
Update tasks.c comment
Browse files Browse the repository at this point in the history
  • Loading branch information
chinglee-iot authored Jan 19, 2024
1 parent 07804b8 commit a31a9a7
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -2291,7 +2291,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
if( pxTCB == pxCurrentTCB )
{
configASSERT( uxSchedulerSuspended == 0 );
portYIELD_WITHIN_API();
taskYIELD_WITHIN_API();
}
else
{
Expand All @@ -2300,17 +2300,16 @@ 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 )
{
if( pxTCB->xTaskRunState == ( BaseType_t ) portGET_CORE_ID() )
{
configASSERT( uxSchedulerSuspended == 0 );
vTaskYieldWithinAPI();
taskYIELD_WITHIN_API();
}
else
{
Expand Down

0 comments on commit a31a9a7

Please sign in to comment.