Uncrustified tasks.c

This commit is contained in:
Joseph Julicher 2021-05-19 08:38:58 -07:00
parent 87279a3dc7
commit 106e15ea6b

24
tasks.c
View file

@ -290,7 +290,6 @@ typedef struct tskTaskControlBlock /* The old naming convention is used to
#endif
#if ( configUSE_NEWLIB_REENTRANT == 1 )
/* Allocate a Newlib reent structure that is specific to this task.
* Note Newlib support has been included by popular demand, but is not
* used by the FreeRTOS maintainers themselves. FreeRTOS is not
@ -1561,6 +1560,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
{
pxNewTCB->xIsIdle = pdTRUE;
}
#if ( configNUM_CORES > 1 )
else if( pxTaskCode == prvMinimalIdleTask )
{
@ -1617,11 +1617,12 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
if( pxCurrentTCBs[ xCoreID ] == NULL )
{
pxNewTCB->xTaskRunState = xCoreID;
/* This section of code pins the idle tasks to cores.
#if ( configUSE_CORE_AFFINITY == 1 )
{
pxNewTCB->uxCoreAffinityMask = ( 1 << xCoreID );
}
* {
* pxNewTCB->uxCoreAffinityMask = ( 1 << xCoreID );
* }
#endif
*/
pxCurrentTCBs[ xCoreID ] = pxNewTCB;
@ -1713,7 +1714,6 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
* no longer running. */
if( xTaskRunningOnCore != taskTASK_NOT_RUNNING )
{
/* A running task is being deleted. This cannot complete within the
* task itself, as a context switch to another task is required.
* Place the task in the termination list. The idle task will
@ -1755,7 +1755,6 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
xCoreID = portGET_CORE_ID();
if( xTaskRunningOnCore == xCoreID )
{
configASSERT( uxSchedulerSuspended == 0 );
@ -2263,7 +2262,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
}
#endif /* configUSE_CORE_AFFINITY */
#endif
#endif /* if ( configNUM_CORES > 1 ) */
/*-----------------------------------------------------------*/
#if ( configNUM_CORES > 1 )
@ -2285,7 +2284,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
}
#endif /* configUSE_CORE_AFFINITY */
#endif
#endif /* if ( configNUM_CORES > 1 ) */
/*-----------------------------------------------------------*/
@ -2705,6 +2704,7 @@ static BaseType_t prvCreateIdleTasks( void )
pxIdleTaskStackBuffer,
pxIdleTaskTCBBuffer ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
}
#if ( configNUM_CORES > 1 )
else
{
@ -2719,7 +2719,8 @@ static BaseType_t prvCreateIdleTasks( void )
xIdleTaskStackBuffers[ xCoreID - 1 ],
&xIdleTCBBuffers[ xCoreID - 1 ] ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
}
#endif
#endif /* if ( configNUM_CORES > 1 ) */
if( xIdleTaskHandle[ xCoreID ] != NULL )
{
xReturn = pdPASS;
@ -2741,6 +2742,7 @@ static BaseType_t prvCreateIdleTasks( void )
portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */
&xIdleTaskHandle[ xCoreID ] ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
}
#if ( configNUM_CORES > 1 )
else
{
@ -2755,6 +2757,7 @@ static BaseType_t prvCreateIdleTasks( void )
}
#endif /* configSUPPORT_STATIC_ALLOCATION */
}
return xReturn;
}
@ -4264,7 +4267,8 @@ static portTASK_FUNCTION( prvMinimalIdleTask, pvParameters )
#endif /* ( ( configUSE_PREEMPTION == 1 ) && ( configIDLE_SHOULD_YIELD == 1 ) ) */
}
}
#endif
#endif /* if ( configNUM_CORES > 1 ) */
/*
* -----------------------------------------------------------
* The Idle task.