Merge branch 'FreeRTOS:main' into update_mpu_wrappers

This commit is contained in:
Rahul Kar 2024-02-14 15:13:11 +05:30 committed by GitHub
commit 8ec3080230
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 34 additions and 27 deletions

View file

@ -2803,9 +2803,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

View file

@ -326,7 +326,7 @@ typedef struct xLIST
} \
\
( pxItemToRemove )->pxContainer = NULL; \
( pxList->uxNumberOfItems )--; \
( ( pxList )->uxNumberOfItems ) -= ( UBaseType_t ) 1U; \
} while( 0 )
/*
@ -363,17 +363,17 @@ typedef struct xLIST
\
/* Insert a new list item into ( pxList ), but rather than sort the list, \
* makes the new list item the last item to be removed by a call to \
* listGET_OWNER_OF_NEXT_ENTRY(). */ \
( pxNewListItem )->pxNext = pxIndex; \
( pxNewListItem )->pxPrevious = pxIndex->pxPrevious; \
\
pxIndex->pxPrevious->pxNext = ( pxNewListItem ); \
pxIndex->pxPrevious = ( pxNewListItem ); \
\
/* Remember which list the item is in. */ \
( pxNewListItem )->pxContainer = ( pxList ); \
\
( ( pxList )->uxNumberOfItems )++; \
* listGET_OWNER_OF_NEXT_ENTRY(). */ \
( pxNewListItem )->pxNext = pxIndex; \
( pxNewListItem )->pxPrevious = pxIndex->pxPrevious; \
\
pxIndex->pxPrevious->pxNext = ( pxNewListItem ); \
pxIndex->pxPrevious = ( pxNewListItem ); \
\
/* Remember which list the item is in. */ \
( pxNewListItem )->pxContainer = ( pxList ); \
\
( ( pxList )->uxNumberOfItems ) += ( UBaseType_t ) 1U; \
} while( 0 )
/*

View file

@ -795,7 +795,7 @@ typedef StreamBufferHandle_t MessageBufferHandle_t;
* \ingroup MessageBufferManagement
*/
#define xMessageBufferNextLengthBytes( xMessageBuffer ) \
xStreamBufferNextMessageLengthBytes( xMessageBuffer ) PRIVILEGED_FUNCTION;
xStreamBufferNextMessageLengthBytes( xMessageBuffer )
/**
* message_buffer.h

9
list.c
View file

@ -130,7 +130,7 @@ void vListInsertEnd( List_t * const pxList,
/* Remember which list the item is in. */
pxNewListItem->pxContainer = pxList;
( pxList->uxNumberOfItems )++;
( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U;
traceRETURN_vListInsertEnd();
}
@ -205,12 +205,13 @@ void vListInsert( List_t * const pxList,
* item later. */
pxNewListItem->pxContainer = pxList;
( pxList->uxNumberOfItems )++;
( pxList->uxNumberOfItems ) += ( UBaseType_t ) 1U;
traceRETURN_vListInsert();
}
/*-----------------------------------------------------------*/
UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
{
/* The list item knows which list it is in. Obtain the list from the list
@ -219,8 +220,6 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
traceENTER_uxListRemove( pxItemToRemove );
pxItemToRemove->pxNext->pxPrevious = pxItemToRemove->pxPrevious;
pxItemToRemove->pxPrevious->pxNext = pxItemToRemove->pxNext;
@ -238,7 +237,7 @@ UBaseType_t uxListRemove( ListItem_t * const pxItemToRemove )
}
pxItemToRemove->pxContainer = NULL;
( pxList->uxNumberOfItems )--;
( pxList->uxNumberOfItems ) -= ( UBaseType_t ) 1U;
traceRETURN_uxListRemove( pxList->uxNumberOfItems );

20
tasks.c
View file

@ -255,7 +255,7 @@
pxTemp = pxDelayedTaskList; \
pxDelayedTaskList = pxOverflowDelayedTaskList; \
pxOverflowDelayedTaskList = pxTemp; \
xNumOfOverflows++; \
xNumOfOverflows += ( BaseType_t ) 1; \
prvResetNextTaskUnblockTime(); \
} while( 0 )
@ -2021,7 +2021,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
* updated. */
taskENTER_CRITICAL();
{
uxCurrentNumberOfTasks++;
uxCurrentNumberOfTasks += ( UBaseType_t ) 1U;
if( pxCurrentTCB == NULL )
{
@ -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
@ -3807,7 +3815,7 @@ void vTaskSuspendAll( void )
/* The scheduler is suspended if uxSchedulerSuspended is non-zero. An increment
* is used to allow calls to vTaskSuspendAll() to nest. */
++uxSchedulerSuspended;
uxSchedulerSuspended += ( UBaseType_t ) 1U;
/* Enforces ordering for ports and optimised compilers that may otherwise place
* the above increment elsewhere. */
@ -3960,7 +3968,7 @@ BaseType_t xTaskResumeAll( void )
* previous call to vTaskSuspendAll(). */
configASSERT( uxSchedulerSuspended != 0U );
--uxSchedulerSuspended;
uxSchedulerSuspended -= ( UBaseType_t ) 1U;
portRELEASE_TASK_LOCK();
if( uxSchedulerSuspended == ( UBaseType_t ) 0U )
@ -4960,7 +4968,7 @@ BaseType_t xTaskIncrementTick( void )
}
else
{
++xPendedTicks;
xPendedTicks += 1U;
/* The tick hook gets called at regular intervals, even if the
* scheduler is locked. */