Fix small bugs

This commit is contained in:
Aniruddha Kanhere 2024-02-17 01:20:35 +00:00
parent e68975fcf7
commit 3470d6545c
3 changed files with 12 additions and 5 deletions

View file

@ -96,6 +96,10 @@
#define configNUMBER_OF_CORES 1
#endif
#ifndef configUSE_MALLOC_FAILED_HOOK
#define configUSE_MALLOC_FAILED_HOOK 0
#endif
/* Basic FreeRTOS definitions. */
#include "projdefs.h"
@ -2649,10 +2653,6 @@
#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS()
#endif
#ifndef configUSE_MALLOC_FAILED_HOOK
#define configUSE_MALLOC_FAILED_HOOK 0
#endif
#ifndef portPRIVILEGE_BIT
#define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )
#endif

View file

@ -64,7 +64,7 @@ typedef long BaseType_t;
typedef unsigned long UBaseType_t;
typedef unsigned long TickType_t;
#define portMAX_DELAY ( TickType_t ) ULONG_MAX
#define portMAX_DELAY ( ( TickType_t ) ULONG_MAX )
#define portTICK_TYPE_IS_ATOMIC 1

View file

@ -3506,6 +3506,9 @@ static BaseType_t prvCreateIdleTasks( void )
TaskFunction_t pxIdleTaskFunction = NULL;
BaseType_t xIdleTaskNameIndex;
/* Make sure that the below for loop doesn't go over the configIDLE_TASK_NAME macro. */
configASSERT( sizeof( configIDLE_TASK_NAME ) >= configMAX_TASK_NAME_LEN );
for( xIdleTaskNameIndex = ( BaseType_t ) 0; xIdleTaskNameIndex < ( BaseType_t ) configMAX_TASK_NAME_LEN; xIdleTaskNameIndex++ )
{
cIdleName[ xIdleTaskNameIndex ] = configIDLE_TASK_NAME[ xIdleTaskNameIndex ];
@ -3517,6 +3520,10 @@ static BaseType_t prvCreateIdleTasks( void )
{
break;
}
else if( xIdleTaskNameIndex >= sizeof( configIDLE_TASK_NAME ) )
{
break;
}
else
{
mtCOVERAGE_TEST_MARKER();