|
|
|
@ -3107,10 +3107,6 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|
|
|
|
{
|
|
|
|
|
TCB_t * pxTCB;
|
|
|
|
|
|
|
|
|
|
#if ( configNUMBER_OF_CORES > 1 )
|
|
|
|
|
BaseType_t xTaskRunningOnCore;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
traceENTER_vTaskSuspend( xTaskToSuspend );
|
|
|
|
|
|
|
|
|
|
taskENTER_CRITICAL();
|
|
|
|
@ -3121,10 +3117,6 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|
|
|
|
|
|
|
|
|
traceTASK_SUSPEND( pxTCB );
|
|
|
|
|
|
|
|
|
|
#if ( configNUMBER_OF_CORES > 1 )
|
|
|
|
|
xTaskRunningOnCore = pxTCB->xTaskRunState;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/* Remove task from the ready/delayed list and place in the
|
|
|
|
|
* suspended list. */
|
|
|
|
|
if( uxListRemove( &( pxTCB->xStateListItem ) ) == ( UBaseType_t ) 0 )
|
|
|
|
@ -3164,9 +3156,6 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|
|
|
|
}
|
|
|
|
|
#endif /* if ( configUSE_TASK_NOTIFICATIONS == 1 ) */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if ( configNUMBER_OF_CORES == 1 )
|
|
|
|
|
{
|
|
|
|
|
taskEXIT_CRITICAL();
|
|
|
|
|
|
|
|
|
|
if( xSchedulerRunning != pdFALSE )
|
|
|
|
@ -3184,6 +3173,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|
|
|
|
mtCOVERAGE_TEST_MARKER();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if ( configNUMBER_OF_CORES == 1 )
|
|
|
|
|
{
|
|
|
|
|
if( pxTCB == pxCurrentTCB )
|
|
|
|
|
{
|
|
|
|
|
if( xSchedulerRunning != pdFALSE )
|
|
|
|
@ -3218,22 +3209,14 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|
|
|
|
}
|
|
|
|
|
#else /* #if ( configNUMBER_OF_CORES == 1 ) */
|
|
|
|
|
{
|
|
|
|
|
if( xSchedulerRunning != pdFALSE )
|
|
|
|
|
{
|
|
|
|
|
/* Reset the next expected unblock time in case it referred to the
|
|
|
|
|
* task that is now in the Suspended state. */
|
|
|
|
|
prvResetNextTaskUnblockTime();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
/* Enter critical section here to check run state of a task. */
|
|
|
|
|
taskENTER_CRITICAL();
|
|
|
|
|
{
|
|
|
|
|
mtCOVERAGE_TEST_MARKER();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE )
|
|
|
|
|
{
|
|
|
|
|
if( xSchedulerRunning != pdFALSE )
|
|
|
|
|
{
|
|
|
|
|
if( xTaskRunningOnCore == ( BaseType_t ) portGET_CORE_ID() )
|
|
|
|
|
if( pxTCB->xTaskRunState == ( BaseType_t ) portGET_CORE_ID() )
|
|
|
|
|
{
|
|
|
|
|
/* The current task has just been suspended. */
|
|
|
|
|
configASSERT( uxSchedulerSuspended == 0 );
|
|
|
|
@ -3241,7 +3224,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
prvYieldCore( xTaskRunningOnCore );
|
|
|
|
|
prvYieldCore( pxTCB->xTaskRunState );
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -3258,7 +3241,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
|
|
|
|
{
|
|
|
|
|
mtCOVERAGE_TEST_MARKER();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
taskEXIT_CRITICAL();
|
|
|
|
|
}
|
|
|
|
|
#endif /* #if ( configNUMBER_OF_CORES == 1 ) */
|
|
|
|
|