mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-11 22:25:14 -05:00
Introduced new type-safe macro for unsigned pdFALSE and pdTRUE.
This commit is contained in:
parent
d3813796b3
commit
8bb4f13ae5
3 changed files with 523 additions and 484 deletions
23
tasks.c
23
tasks.c
|
|
@ -24,13 +24,6 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Verifast proof setup */
|
|
||||||
#ifdef VERIFAST
|
|
||||||
#include "verifast_proof_defs.h"
|
|
||||||
#include "task_predicates.h"
|
|
||||||
#include "verifast_RP2040_axioms.h"
|
|
||||||
#include "verifast_prelude_extended.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Standard includes. */
|
/* Standard includes. */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
@ -47,7 +40,16 @@
|
||||||
#include "timers.h"
|
#include "timers.h"
|
||||||
#include "stack_macros.h"
|
#include "stack_macros.h"
|
||||||
|
|
||||||
|
/* Verifast proof setup
|
||||||
|
*
|
||||||
|
* Note that redefinitions of macros must be included after
|
||||||
|
* original ones have been included.
|
||||||
|
*/
|
||||||
#ifdef VERIFAST
|
#ifdef VERIFAST
|
||||||
|
#include "verifast_proof_defs.h"
|
||||||
|
#include "task_predicates.h"
|
||||||
|
#include "verifast_RP2040_axioms.h"
|
||||||
|
#include "verifast_prelude_extended.h"
|
||||||
#include "verifast_asm.h"
|
#include "verifast_asm.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1676,7 +1678,12 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
|
||||||
|
|
||||||
#if ( INCLUDE_xTaskAbortDelay == 1 )
|
#if ( INCLUDE_xTaskAbortDelay == 1 )
|
||||||
{
|
{
|
||||||
pxNewTCB->ucDelayAborted = pdFALSE;
|
#ifdef VERIFAST
|
||||||
|
/* Reason for rewrite: Assignment not type safe. */
|
||||||
|
pxNewTCB->ucDelayAborted = pd_U_FALSE;
|
||||||
|
#else
|
||||||
|
pxNewTCB->ucDelayAborted = pdFALSE;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -9,6 +9,15 @@
|
||||||
#define inline
|
#define inline
|
||||||
#define __always_inline
|
#define __always_inline
|
||||||
|
|
||||||
#undef assert
|
/* `projdefs.h` defines `pdFALSE` and `pdTRUE` as 0 and 1 of type
|
||||||
#define assert(x) BLUB(x)
|
* `BaseType_t`. Both are assigned to variables smaller or
|
||||||
|
* unsigned types. While that's safe in practice, it is not
|
||||||
|
* type safe. Hence we define
|
||||||
|
*/
|
||||||
|
#undef pdFALSE
|
||||||
|
#undef pdTRUE
|
||||||
|
#define pdFALSE ( ( char ) 0 )
|
||||||
|
#define pdTRUE ( ( char ) 1 )
|
||||||
|
#define pd_U_FALSE ( ( unsigned char ) pdFALSE )
|
||||||
|
#define pd_U_TRUE ( ( unsigned char ) pdTRUE )
|
||||||
#endif /* VERIFAST_DEFS_H */
|
#endif /* VERIFAST_DEFS_H */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue