Skip to content

Commit

Permalink
Move static idle task memory to global scope (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
chinglee-iot authored Apr 20, 2023
1 parent 23ce58e commit 9da6836
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,11 @@ PRIVILEGED_DATA static volatile UBaseType_t uxSchedulerSuspended = ( UBaseType_t

#endif

#if ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configNUMBER_OF_CORES > 1 )
static StaticTask_t xIdleTCBBuffers[ configNUMBER_OF_CORES - 1 ];
static StackType_t xIdleTaskStackBuffers[ configNUMBER_OF_CORES - 1 ][ configMINIMAL_STACK_SIZE ];
#endif /* #if ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configNUMBER_OF_CORES > 1 ) */

/*lint -restore */

/*-----------------------------------------------------------*/
Expand Down Expand Up @@ -3171,9 +3176,6 @@ static BaseType_t prvCreateIdleTasks( void )
}
else
{
static StaticTask_t xIdleTCBBuffers[ configNUMBER_OF_CORES - 1 ];
static StackType_t xIdleTaskStackBuffers[ configNUMBER_OF_CORES - 1 ][ configMINIMAL_STACK_SIZE ];

xIdleTaskHandles[ xCoreID ] = xTaskCreateStatic( prvMinimalIdleTask,
cIdleName,
configMINIMAL_STACK_SIZE,
Expand Down

0 comments on commit 9da6836

Please sign in to comment.