mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-07 13:45:00 -05:00
Merge branch 'main' into ARM_CRx_MPU
This commit is contained in:
commit
1eae231c6f
2 changed files with 12 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
10
tasks.c
10
tasks.c
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue