Skip to content

Commit

Permalink
Merge branch 'main' into ARM_CRx_MPU
Browse files Browse the repository at this point in the history
  • Loading branch information
Skptak authored Feb 13, 2024
2 parents 5929dc7 + 8cfa715 commit 1eae231
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions include/FreeRTOS.h
Original file line number Diff line number Diff line change
Expand Up @@ -2799,9 +2799,9 @@

#ifndef configSTACK_DEPTH_TYPE

/* Defaults to uint16_t for backward compatibility, but can be overridden
* in FreeRTOSConfig.h if uint16_t is too restrictive. */
#define configSTACK_DEPTH_TYPE uint16_t
/* Defaults to StackType_t for backward compatibility, but can be overridden
* in FreeRTOSConfig.h if StackType_t is too restrictive. */
#define configSTACK_DEPTH_TYPE StackType_t
#endif

#ifndef configRUN_TIME_COUNTER_TYPE
Expand Down
10 changes: 9 additions & 1 deletion tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3208,6 +3208,8 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,

#if ( configNUMBER_OF_CORES == 1 )
{
UBaseType_t uxCurrentListLength;

if( xSchedulerRunning != pdFALSE )
{
/* Reset the next expected unblock time in case it referred to the
Expand Down Expand Up @@ -3236,7 +3238,13 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
/* The scheduler is not running, but the task that was pointed
* to by pxCurrentTCB has just been suspended and pxCurrentTCB
* must be adjusted to point to a different task. */
if( listCURRENT_LIST_LENGTH( &xSuspendedTaskList ) == uxCurrentNumberOfTasks )

/* Use a temp variable as a distinct sequence point for reading
* volatile variables prior to a comparison to ensure compliance
* with MISRA C 2012 Rule 13.2. */
uxCurrentListLength = listCURRENT_LIST_LENGTH( &xSuspendedTaskList );

if( uxCurrentListLength == uxCurrentNumberOfTasks )
{
/* No other tasks are ready, so set pxCurrentTCB back to
* NULL so when the next task is created pxCurrentTCB will
Expand Down

0 comments on commit 1eae231

Please sign in to comment.