mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-12-14 07:35:11 -05:00
VF rewrite: Fixed an evaluation order in taskCHECK_FOR_STACK_OVERFLOW.
This commit is contained in:
parent
c3c350f8dc
commit
a7d1ca343a
1 changed files with 7 additions and 4 deletions
|
|
@ -87,13 +87,14 @@
|
||||||
#ifdef VERIFAST
|
#ifdef VERIFAST
|
||||||
/* Reason for rewrite:
|
/* Reason for rewrite:
|
||||||
* VeriFast complains about unspecified evaluation order of
|
* VeriFast complains about unspecified evaluation order of
|
||||||
* `pxCurrentTCB->pxStack`.
|
* - `pxCurrentTCB->pxStack`
|
||||||
|
* - `vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName );`
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#define taskCHECK_FOR_STACK_OVERFLOW() \
|
#define taskCHECK_FOR_STACK_OVERFLOW() \
|
||||||
{ \
|
{ \
|
||||||
TCB_t* tcb = pxCurrentTCB; \
|
TCB_t* tcb0 = pxCurrentTCB; \
|
||||||
const uint32_t * const pulStack = ( uint32_t * ) tcb->pxStack; \
|
const uint32_t * const pulStack = ( uint32_t * ) tcb0->pxStack; \
|
||||||
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
|
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5; \
|
||||||
\
|
\
|
||||||
if( ( pulStack[ 0 ] != ulCheckValue ) || \
|
if( ( pulStack[ 0 ] != ulCheckValue ) || \
|
||||||
|
|
@ -101,7 +102,9 @@
|
||||||
( pulStack[ 2 ] != ulCheckValue ) || \
|
( pulStack[ 2 ] != ulCheckValue ) || \
|
||||||
( pulStack[ 3 ] != ulCheckValue ) ) \
|
( pulStack[ 3 ] != ulCheckValue ) ) \
|
||||||
{ \
|
{ \
|
||||||
vApplicationStackOverflowHook( ( TaskHandle_t ) pxCurrentTCB, pxCurrentTCB->pcTaskName ); \
|
TCB_t* tcb1 = pxCurrentTCB; \
|
||||||
|
TCB_t* tcb2 = pxCurrentTCB; \
|
||||||
|
vApplicationStackOverflowHook( ( TaskHandle_t ) tcb1, tcb2->pcTaskName ); \
|
||||||
} \
|
} \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue