mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-12 14:45:09 -05:00
Added rewrite to remove const qualifiers from pointers.
This commit is contained in:
parent
2404a2f253
commit
94e0f21574
4 changed files with 397 additions and 131 deletions
7
tasks.c
7
tasks.c
|
|
@ -62,7 +62,11 @@
|
||||||
#include "verifast_bitops_extended.h"
|
#include "verifast_bitops_extended.h"
|
||||||
#include "verifast_asm.h"
|
#include "verifast_asm.h"
|
||||||
|
|
||||||
|
//#include "verifast_lock_predicates.h"
|
||||||
|
|
||||||
#include "snippets/rp2040_port_c_snippets.c"
|
#include "snippets/rp2040_port_c_snippets.c"
|
||||||
|
|
||||||
|
#include "list.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Lint e9021, e961 and e750 are suppressed as a MISRA exception justified
|
/* Lint e9021, e961 and e750 are suppressed as a MISRA exception justified
|
||||||
|
|
@ -1673,7 +1677,10 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
}
|
}
|
||||||
#endif /* configUSE_MUTEXES */
|
#endif /* configUSE_MUTEXES */
|
||||||
|
|
||||||
|
// TODO: Add contract
|
||||||
|
// TODO: Why does VeriFast not complain?
|
||||||
vListInitialiseItem( &( pxNewTCB->xStateListItem ) );
|
vListInitialiseItem( &( pxNewTCB->xStateListItem ) );
|
||||||
|
//@ assert(false);
|
||||||
vListInitialiseItem( &( pxNewTCB->xEventListItem ) );
|
vListInitialiseItem( &( pxNewTCB->xEventListItem ) );
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ rewrite()
|
||||||
echo "Commenting out line/file pragmas"
|
echo "Commenting out line/file pragmas"
|
||||||
rewrite "^#" "// &"
|
rewrite "^#" "// &"
|
||||||
|
|
||||||
|
echo "Fixing order of 'long', 'unsigned'"
|
||||||
rewrite "long unsigned int" "unsigned long int"
|
rewrite "long unsigned int" "unsigned long int"
|
||||||
|
|
||||||
echo "Delete fixed-sized array typedefs"
|
echo "Delete fixed-sized array typedefs"
|
||||||
|
|
@ -35,6 +36,9 @@ rewrite "__attribute__(([_a-z]*))" ""
|
||||||
# TODO: Why does matching `\s` or `:space:` not work on MacOs?
|
# TODO: Why does matching `\s` or `:space:` not work on MacOs?
|
||||||
rewrite "__attribute__( ( [_a-z]* ) )" ""
|
rewrite "__attribute__( ( [_a-z]* ) )" ""
|
||||||
|
|
||||||
|
echo "Removing const qualifiers from pointers"
|
||||||
|
rewrite "* const" "*"
|
||||||
|
|
||||||
#echo "VF RW: 'long unsigned int' -> 'unsinged long int'"
|
#echo "VF RW: 'long unsigned int' -> 'unsinged long int'"
|
||||||
#echo "backup : $VF_RW_WD/$SOURCE_FILE.backup-$BACKUP_IDX"
|
#echo "backup : $VF_RW_WD/$SOURCE_FILE.backup-$BACKUP_IDX"
|
||||||
#echo backup index $BACKUP_IDX
|
#echo backup index $BACKUP_IDX
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
34
verification/verifast/proof/verifast_lock_predicates.h
Normal file
34
verification/verifast/proof/verifast_lock_predicates.h
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#ifndef VERIFAST_LOCK_PREDICATES_H
|
||||||
|
#define VERIFAST_LOCK_PREDICATES_H
|
||||||
|
|
||||||
|
|
||||||
|
/* We assume that macros evaluate as follows:
|
||||||
|
* - `configMAX_PRIORITIES` -> 32
|
||||||
|
*/
|
||||||
|
/*@
|
||||||
|
predicate tasks_global_vars() =
|
||||||
|
// Lists for ready and blocked tasks.
|
||||||
|
//chars((char*) pxReadyTasksLists, 32 * sizeof(List_t), _) &*&
|
||||||
|
//chars((char*) xDelayedTaskList1) &*&
|
||||||
|
|
||||||
|
// Other file private variables. --------------------------------
|
||||||
|
integer_((void*) uxCurrentNumberOfTasks, sizeof(UBaseType_t), false, _)
|
||||||
|
&*&
|
||||||
|
|
||||||
|
|
||||||
|
true;
|
||||||
|
@*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void vf_validate_lock_predicaet()
|
||||||
|
//@ requires module(tasks__pp, true);
|
||||||
|
//@ ensures true;
|
||||||
|
{
|
||||||
|
//@ open_module();
|
||||||
|
uxCurrentNumberOfTasks = 0;
|
||||||
|
|
||||||
|
//@ close tasks_global_vars();
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* VERIFAST_LOCK_PREDICATES_H */
|
||||||
Loading…
Add table
Add a link
Reference in a new issue