Skip to content

Commit ad317ef

Browse files
committed
Added multiple IDLE tasks to non-static allocation
1 parent 80457ca commit ad317ef

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tasks.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2715,13 +2715,27 @@ void vTaskStartScheduler( void )
27152715
}
27162716
#else /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
27172717
{
2718+
if(xCoreID == 0)
2719+
{
27182720
/* The Idle task is being created using dynamically allocated RAM. */
27192721
xReturn = xTaskCreate( prvIdleTask,
27202722
cIdleName,
27212723
configMINIMAL_STACK_SIZE,
27222724
( void * ) NULL,
27232725
portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */
27242726
&xIdleTaskHandle[ xCoreID ] ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
2727+
}
2728+
#if( configNUM_CORES > 1 )
2729+
else
2730+
{
2731+
xReturn = xTaskCreate( prvMinimalIdleTask,
2732+
cIdleName,
2733+
configMINIMAL_STACK_SIZE,
2734+
( void * ) NULL,
2735+
portPRIVILEGE_BIT, /* In effect ( tskIDLE_PRIORITY | portPRIVILEGE_BIT ), but tskIDLE_PRIORITY is zero. */
2736+
&xIdleTaskHandle[ xCoreID ] ); /*lint !e961 MISRA exception, justified as it is not a redundant explicit cast to all supported compilers. */
2737+
}
2738+
#endif
27252739
}
27262740
#endif /* configSUPPORT_STATIC_ALLOCATION */
27272741
}

0 commit comments

Comments
 (0)