From: richardbarry Date: Fri, 18 Feb 2011 17:40:30 +0000 (+0000) Subject: Move one of the configASSERT() statements in tasks.c to be inside the if() that check... X-Git-Tag: V7.0.0~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=b9c5d9b0041444518270a487c1cc19ffb58be576;p=freertos Move one of the configASSERT() statements in tasks.c to be inside the if() that checks whether the stack should grow up or down. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1300 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/tasks.c b/Source/tasks.c index 122fedcb6..aad896a6d 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -454,9 +454,6 @@ tskTCB * pxNewTCB; uxPriority &= ~portPRIVILEGE_BIT; #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 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 @@ -472,6 +469,9 @@ tskTCB * pxNewTCB; #else { 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 a positive stack growth direction then we also need to store the