Compare commits

..

No commits in common. "b35769711023e057a02a21c458a71918098b354c" and "fa902e6f606fa3162e1db6e19abcfc3ab4b316cd" have entirely different histories.

View file

@ -68,8 +68,8 @@
#if ( configNUMBER_OF_CORES == 1 ) #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() \ #define taskCHECK_FOR_STACK_OVERFLOW() \
do \ do \
{ \ { \
/* Is the currently saved stack pointer within the stack limit? */ \ /* Is the currently saved stack pointer within the stack limit? */ \
@ -80,13 +80,13 @@
} \ } \
} while( 0 ) } while( 0 )
#else /* if ( configNUMBER_OF_CORES == 1 ) */ #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 ) \ #define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
do \ do \
{ \ { \
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \ const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
\ \
/* Is the currently saved stack pointer within the stack limit? */ \ /* Is the currently saved stack pointer within the stack limit? */ \
if( pxTCB->pxTopOfStack <= pxTCB->pxStack + portSTACK_LIMIT_PADDING ) \ if( pxTCB->pxTopOfStack <= pxTCB->pxStack + portSTACK_LIMIT_PADDING ) \
@ -105,8 +105,8 @@
#if ( configNUMBER_OF_CORES == 1 ) #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() \ #define taskCHECK_FOR_STACK_OVERFLOW() \
do \ do \
{ \ { \
/* Is the currently saved stack pointer within the stack limit? */ \ /* Is the currently saved stack pointer within the stack limit? */ \
@ -117,13 +117,13 @@
} \ } \
} while( 0 ) } while( 0 )
#else /* if ( configNUMBER_OF_CORES == 1 ) */ #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 ) \ #define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
do \ do \
{ \ { \
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \ const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
\ \
/* Is the currently saved stack pointer within the stack limit? */ \ /* Is the currently saved stack pointer within the stack limit? */ \
if( pxTCB->pxTopOfStack >= pxTCB->pxEndOfStack - portSTACK_LIMIT_PADDING ) \ if( pxTCB->pxTopOfStack >= pxTCB->pxEndOfStack - portSTACK_LIMIT_PADDING ) \
@ -142,7 +142,7 @@
#if ( configNUMBER_OF_CORES == 1 ) #if ( configNUMBER_OF_CORES == 1 )
#define taskCHECK_FOR_STACK_OVERFLOW() \ #define taskCHECK_FOR_STACK_OVERFLOW() \
do \ do \
{ \ { \
const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \ const uint32_t * const pulStack = ( uint32_t * ) pxCurrentTCB->pxStack; \
@ -159,12 +159,12 @@
} \ } \
} while( 0 ) } while( 0 )
#else /* if ( configNUMBER_OF_CORES == 1 ) */ #else /* if ( configNUMBER_OF_CORES == 1 ) */
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \ #define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
do \ do \
{ \ { \
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \ const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
const uint32_t * const pulStack = ( uint32_t * ) pxTCB->pxStack; \ const uint32_t * const pulStack = ( uint32_t * ) pxTCB->pxStack; \
const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5U; \ const uint32_t ulCheckValue = ( uint32_t ) 0xa5a5a5a5U; \
\ \
@ -188,7 +188,7 @@
#if ( configNUMBER_OF_CORES == 1 ) #if ( configNUMBER_OF_CORES == 1 )
#define taskCHECK_FOR_STACK_OVERFLOW() \ #define taskCHECK_FOR_STACK_OVERFLOW() \
do \ do \
{ \ { \
int8_t * pcEndOfStack = ( int8_t * ) pxCurrentTCB->pxEndOfStack; \ int8_t * pcEndOfStack = ( int8_t * ) pxCurrentTCB->pxEndOfStack; \
@ -208,12 +208,12 @@
} \ } \
} while( 0 ) } while( 0 )
#else /* if ( configNUMBER_OF_CORES == 1 ) */ #else /* if ( configNUMBER_OF_CORES == 1 ) */
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \ #define taskCHECK_FOR_STACK_OVERFLOW( xCoreID ) \
do \ do \
{ \ { \
TCB_t * pxTCB = pxCurrentTCBs[ xCoreID ]; \ const TCB_t * const pxTCB = pxCurrentTCBs[ xCoreID ]; \
int8_t * pcEndOfStack = ( int8_t * ) pxTCB->pxEndOfStack; \ int8_t * pcEndOfStack = ( int8_t * ) pxTCB->pxEndOfStack; \
static const uint8_t ucExpectedStackBytes[] = { tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \ 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, \ tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, tskSTACK_FILL_BYTE, \
@ -238,11 +238,7 @@
/* Remove stack overflow macro if not being used. */ /* Remove stack overflow macro if not being used. */
#ifndef taskCHECK_FOR_STACK_OVERFLOW #ifndef taskCHECK_FOR_STACK_OVERFLOW
#if ( configNUMBER_OF_CORES == 1 ) #define taskCHECK_FOR_STACK_OVERFLOW()
#define taskCHECK_FOR_STACK_OVERFLOW()
#else
#define taskCHECK_FOR_STACK_OVERFLOW( xCoreID )
#endif
#endif #endif