Verified macro taskCHECK_FOR_STACK_OVERFLOW.

This commit is contained in:
Tobias Reinhard 2022-11-17 09:20:21 -05:00
parent 2f0b8bc82f
commit d3bda01f16
5 changed files with 81 additions and 8 deletions

23
tasks.c
View file

@ -56,7 +56,16 @@
#include "FreeRTOS.h"
#include "task.h"
#include "timers.h"
#include "stack_macros.h"
#ifndef VERIFAST
/* Reason for rewrite:
* The stack macros rely on macros defined later in this file, e.g.,
* `pxCurrentTCB`. We need to delay this inclusion until the task macros
* have been defined. Otherwise, VeriFast will report unknown symbols when
* checking the stack macro proofs.
*/
#include "stack_macros.h"
#endif /* VERIFAST */
/* Verifast proof setup
*
@ -381,6 +390,18 @@ PRIVILEGED_DATA static List_t * volatile pxDelayedTaskList; /*< Poi
PRIVILEGED_DATA static List_t * volatile pxOverflowDelayedTaskList; /*< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */
PRIVILEGED_DATA static List_t xPendingReadyList; /*< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */
#ifdef VERIFAST
/* Reason for rewrite:
* The stack macros rely on some of the macros defined above, e.g.,
* `pxCurrentTCB`. We need to delay this inclusion until the relevant task
* macros have been defined. Otherwise, VeriFast will report unknown symbols
* when checking the stack macro proofs.
*/
#include "stack_macros.h"
#endif /* VERIFAST */
#if ( INCLUDE_vTaskDelete == 1 )
PRIVILEGED_DATA static List_t xTasksWaitingTermination; /*< Tasks that have been deleted - but their memory not yet freed. */