diff --git a/MISRA.md b/MISRA.md index 87ff4cbcd..f2008328c 100644 --- a/MISRA.md +++ b/MISRA.md @@ -51,6 +51,9 @@ _Ref 8.6.1_ - This rule prohibits an identifier with external linkage to have multiple definitions or no definition. FreeRTOS hook functions are implemented in the application and therefore, have no definition in the Kernel code. + - Port layer function declarations are provided without corresponding + implementations to provide for ease of porting to a device. These definitions + cannot be implemented until a port is selected. #### Rule 11.1 MISRA C:2012 Rule 11.1: Conversions shall not be performed between a pointer to diff --git a/include/portable.h b/include/portable.h index 68e11e793..477eebb84 100644 --- a/include/portable.h +++ b/include/portable.h @@ -175,20 +175,44 @@ typedef struct xHeapStats * terminated by a HeapRegions_t structure that has a size of 0. The region * with the lowest start address must appear first in the array. */ +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions ) PRIVILEGED_FUNCTION; -/* - * Returns a HeapStats_t structure filled with information about the current - * heap state. - */ -void vPortGetHeapStats( HeapStats_t * pxHeapStats ); - /* * Map to the memory management routines required for the port. */ +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ void * pvPortMalloc( size_t xWantedSize ) PRIVILEGED_FUNCTION; +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ void * pvPortCalloc( size_t xNum, size_t xSize ) PRIVILEGED_FUNCTION; +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ +void vPortFree( void * pv ) PRIVILEGED_FUNCTION; +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ +void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION; +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ +size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION; +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ +size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION; +/* MISRA Ref 8.6.1 [External linkage] */ +/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-86 */ +/* coverity[misra_c_2012_rule_8_6_violation] */ +void xPortResetHeapMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION; + size_t xSize ) PRIVILEGED_FUNCTION; void vPortFree( void * pv ) PRIVILEGED_FUNCTION; void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION; size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;