mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-11 13:54:16 -04:00
Update coverity example README (#1020)
* Update coverity example README * Update main.c for comment --------- Co-authored-by: Ubuntu <ubuntu@ip-172-31-34-245.ap-northeast-1.compute.internal>
This commit is contained in:
parent
52ee9faa72
commit
ccbbf04e5b
2 changed files with 30 additions and 21 deletions
|
@ -43,7 +43,13 @@
|
|||
/* Standard includes. */
|
||||
#include <stdio.h>
|
||||
|
||||
void exampleTask( void * parameters )
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void exampleTask( void * parameters );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void exampleTask( void * parameters )
|
||||
{
|
||||
/* Unused parameters. */
|
||||
( void ) parameters;
|
||||
|
@ -61,15 +67,15 @@ void main( void )
|
|||
static StaticTask_t exampleTaskTCB;
|
||||
static StackType_t exampleTaskStack[ configMINIMAL_STACK_SIZE ];
|
||||
|
||||
printf( "Example FreeRTOS Project\n" );
|
||||
( void ) printf( "Example FreeRTOS Project\n" );
|
||||
|
||||
xTaskCreateStatic( exampleTask,
|
||||
"example",
|
||||
configMINIMAL_STACK_SIZE,
|
||||
NULL,
|
||||
configMAX_PRIORITIES - 1,
|
||||
&( exampleTaskStack[ 0 ] ),
|
||||
&( exampleTaskTCB ) );
|
||||
( void ) xTaskCreateStatic( exampleTask,
|
||||
"example",
|
||||
configMINIMAL_STACK_SIZE,
|
||||
NULL,
|
||||
configMAX_PRIORITIES - 1U,
|
||||
&( exampleTaskStack[ 0 ] ),
|
||||
&( exampleTaskTCB ) );
|
||||
|
||||
/* Start the scheduler. */
|
||||
vTaskStartScheduler();
|
||||
|
@ -81,12 +87,16 @@ void main( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( TaskHandle_t xTask,
|
||||
char * pcTaskName )
|
||||
{
|
||||
/* Check pcTaskName for the name of the offending task,
|
||||
* or pxCurrentTCB if pcTaskName has itself been corrupted. */
|
||||
( void ) xTask;
|
||||
( void ) pcTaskName;
|
||||
}
|
||||
#if ( configCHECK_FOR_STACK_OVERFLOW > 0 )
|
||||
|
||||
void vApplicationStackOverflowHook( TaskHandle_t xTask,
|
||||
char * pcTaskName )
|
||||
{
|
||||
/* Check pcTaskName for the name of the offending task,
|
||||
* or pxCurrentTCB if pcTaskName has itself been corrupted. */
|
||||
( void ) xTask;
|
||||
( void ) pcTaskName;
|
||||
}
|
||||
|
||||
#endif /* #if ( configCHECK_FOR_STACK_OVERFLOW > 0 ) */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue