mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-24 15:31:56 -04:00
Move one of the configASSERT() statements in tasks.c to be inside the if() that checks whether the stack should grow up or down.
This commit is contained in:
parent
7759f7c973
commit
50dcd0c682
|
@ -454,9 +454,6 @@ tskTCB * pxNewTCB;
|
||||||
uxPriority &= ~portPRIVILEGE_BIT;
|
uxPriority &= ~portPRIVILEGE_BIT;
|
||||||
#endif /* portUSING_MPU_WRAPPERS == 1 */
|
#endif /* portUSING_MPU_WRAPPERS == 1 */
|
||||||
|
|
||||||
/* Check the alignment of the stack buffer is correct. */
|
|
||||||
configASSERT( !( ( unsigned long ) pxNewTCB->pxStack & ( unsigned long ) portBYTE_ALIGNMENT_MASK ) );
|
|
||||||
|
|
||||||
/* Calculate the top of stack address. This depends on whether the
|
/* Calculate the top of stack address. This depends on whether the
|
||||||
stack grows from high memory to low (as per the 80x86) or visa versa.
|
stack grows from high memory to low (as per the 80x86) or visa versa.
|
||||||
portSTACK_GROWTH is used to make the result positive or negative as
|
portSTACK_GROWTH is used to make the result positive or negative as
|
||||||
|
@ -473,6 +470,9 @@ tskTCB * pxNewTCB;
|
||||||
{
|
{
|
||||||
pxTopOfStack = pxNewTCB->pxStack;
|
pxTopOfStack = pxNewTCB->pxStack;
|
||||||
|
|
||||||
|
/* Check the alignment of the stack buffer is correct. */
|
||||||
|
configASSERT( !( ( unsigned long ) pxNewTCB->pxStack & ( unsigned long ) portBYTE_ALIGNMENT_MASK ) );
|
||||||
|
|
||||||
/* If we want to use stack checking on architectures that use
|
/* If we want to use stack checking on architectures that use
|
||||||
a positive stack growth direction then we also need to store the
|
a positive stack growth direction then we also need to store the
|
||||||
other extreme of the stack space. */
|
other extreme of the stack space. */
|
||||||
|
|
Loading…
Reference in a new issue