mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-07-04 19:37:15 -04:00
Compare commits
3 commits
fa902e6f60
...
b357697110
Author | SHA1 | Date | |
---|---|---|---|
|
b357697110 | ||
|
90d8db53c2 | ||
|
f1132d05ae |
|
@ -68,7 +68,7 @@
|
|||
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
|
||||
/* Only the current stack state is to be checked. */
|
||||
/* Only the current stack state is to be checked. */
|
||||
#define taskCHECK_FOR_STACK_OVERFLOW() \
|
||||
do \
|
||||
{ \
|
||||
|
@ -82,11 +82,11 @@
|
|||
|
||||
#else /* if ( configNUMBER_OF_CORES == 1 ) */
|
||||
|
||||
/* Only the current stack state is to be checked. */
|
||||
/* Only the current stack state is to be checked. */
|
||||
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
|
||||
do \
|
||||
{ \
|
||||
const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
\
|
||||
/* Is the currently saved stack pointer within the stack limit? */ \
|
||||
if( pxTCB->pxTopOfStack <= pxTCB->pxStack + portSTACK_LIMIT_PADDING ) \
|
||||
|
@ -105,7 +105,7 @@
|
|||
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
|
||||
/* Only the current stack state is to be checked. */
|
||||
/* Only the current stack state is to be checked. */
|
||||
#define taskCHECK_FOR_STACK_OVERFLOW() \
|
||||
do \
|
||||
{ \
|
||||
|
@ -119,11 +119,11 @@
|
|||
|
||||
#else /* if ( configNUMBER_OF_CORES == 1 ) */
|
||||
|
||||
/* Only the current stack state is to be checked. */
|
||||
/* Only the current stack state is to be checked. */
|
||||
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
|
||||
do \
|
||||
{ \
|
||||
const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
\
|
||||
/* Is the currently saved stack pointer within the stack limit? */ \
|
||||
if( pxTCB->pxTopOfStack >= pxTCB->pxEndOfStack - portSTACK_LIMIT_PADDING ) \
|
||||
|
@ -164,7 +164,7 @@
|
|||
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
|
||||
do \
|
||||
{ \
|
||||
const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
const uint32_t * const pulStack = ( uint32_t * ) pxTCB->pxStack; \
|
||||
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5U; \
|
||||
\
|
||||
|
@ -213,7 +213,7 @@
|
|||
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
|
||||
do \
|
||||
{ \
|
||||
const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \
|
||||
int8_t * pcEndOfStack = ( int8_t * ) pxTCB->pxEndOfStack; \
|
||||
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
|
||||
|
@ -238,7 +238,11 @@
|
|||
|
||||
/* Remove stack overflow macro if not being used. */
|
||||
#ifndef taskCHECK_FOR_STACK_OVERFLOW
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
#define taskCHECK_FOR_STACK_OVERFLOW()
|
||||
#else
|
||||
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID )
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue