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