From 728f36ecb6111cf147aee41136405f98303a4209 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Tue, 25 Jun 2013 13:39:50 +0000 Subject: [PATCH] Remove portALIGNMENT_ASSERT_pxCurrentTCB() macro, which serves no purpose. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1949 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Source/include/FreeRTOS.h | 4 ---- FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h | 4 ---- FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h | 4 ---- FreeRTOS/Source/portable/GCC/RX100/portmacro.h | 3 --- FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h | 4 ---- FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h | 5 ----- FreeRTOS/Source/portable/IAR/RX100/portmacro.h | 3 --- FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h | 5 ----- FreeRTOS/Source/portable/Renesas/RX100/portmacro.h | 3 --- FreeRTOS/Source/portable/Renesas/RX200/portmacro.h | 3 --- FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h | 4 ---- FreeRTOS/Source/tasks.c | 11 ++++------- 12 files changed, 4 insertions(+), 49 deletions(-) diff --git a/FreeRTOS/Source/include/FreeRTOS.h b/FreeRTOS/Source/include/FreeRTOS.h index 34fc48972..852e24c79 100644 --- a/FreeRTOS/Source/include/FreeRTOS.h +++ b/FreeRTOS/Source/include/FreeRTOS.h @@ -231,10 +231,6 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * ); #define configASSERT( x ) #endif -#ifndef portALIGNMENT_ASSERT_pxCurrentTCB - #define portALIGNMENT_ASSERT_pxCurrentTCB configASSERT -#endif - /* The timers module relies on xTaskGetSchedulerState(). */ #if configUSE_TIMERS == 1 diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h index 218c95975..a313a645e 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM3_MPU/portmacro.h @@ -214,10 +214,6 @@ extern void vPortExitCritical( void ); #define portNOP() -/* There are an uneven number of items on the initial stack, so -portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB ( void ) - #ifdef __cplusplus } diff --git a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h index 3ad77b20c..7d58e7b82 100644 --- a/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h @@ -136,10 +136,6 @@ extern void vPortClearInterruptMask( unsigned long ulNewMaskValue ); #define portENTER_CRITICAL() vPortEnterCritical() #define portEXIT_CRITICAL() vPortExitCritical() -/* There are an uneven number of items on the initial stack, so -portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB ( void ) - /*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. These are diff --git a/FreeRTOS/Source/portable/GCC/RX100/portmacro.h b/FreeRTOS/Source/portable/GCC/RX100/portmacro.h index b10cd8ab6..f5317c07b 100644 --- a/FreeRTOS/Source/portable/GCC/RX100/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/RX100/portmacro.h @@ -159,9 +159,6 @@ void vPortSetIPL( unsigned long ulNewIPL ) __attribute__((naked)); #endif #endif -/* This macro is not appropriate for this port so is defined away. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB( x ) - /*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. */ diff --git a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h index e06fa3851..9448ea6c8 100644 --- a/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h +++ b/FreeRTOS/Source/portable/GCC/TriCore_1782/portmacro.h @@ -188,10 +188,6 @@ extern void vTaskExitCritical( void ); extern unsigned long uxPortSetInterruptMaskFromISR( void ); #define portSET_INTERRUPT_MASK_FROM_ISR() uxPortSetInterruptMaskFromISR() -/* As this port holds a CSA address in pxTopOfStack, the assert that checks the -pxTopOfStack alignment is removed. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB ( void ) - /* Pend a priority 1 interrupt, which will take care of the context switch. */ #define portYIELD_FROM_ISR( xHigherPriorityTaskWoken ) if( xHigherPriorityTaskWoken != pdFALSE ) { CPU_SRC0.bits.SETR = 1; _isync(); } diff --git a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h index a9c6e8890..8ef0e0724 100644 --- a/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h @@ -157,11 +157,6 @@ extern void vPortClearInterruptMask( unsigned long ulNewMask ); #define portCLEAR_INTERRUPT_MASK_FROM_ISR(x) vPortClearInterruptMask( x ) /*-----------------------------------------------------------*/ -/* There are an uneven number of items on the initial stack, so -portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB ( void ) -/*-----------------------------------------------------------*/ - /* Tickless idle/low power functionality. */ #ifndef portSUPPRESS_TICKS_AND_SLEEP extern void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime ); diff --git a/FreeRTOS/Source/portable/IAR/RX100/portmacro.h b/FreeRTOS/Source/portable/IAR/RX100/portmacro.h index c3cfe6c1b..d8c421fb9 100644 --- a/FreeRTOS/Source/portable/IAR/RX100/portmacro.h +++ b/FreeRTOS/Source/portable/IAR/RX100/portmacro.h @@ -167,9 +167,6 @@ void vPortSetIPL( unsigned long ulNewIPL ); #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) -/* This macro is not appropriate for this port so is defined away. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB( x ) - #ifdef __cplusplus } #endif diff --git a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h index a3c1748a8..ef8fa6252 100644 --- a/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/RVDS/ARM_CM4F/portmacro.h @@ -138,11 +138,6 @@ extern void vPortExitCritical( void ); /*-----------------------------------------------------------*/ -/* There are an uneven number of items on the initial stack, so -portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB ( void ) -/*-----------------------------------------------------------*/ - /* Tickless idle/low power functionality. */ #ifndef portSUPPRESS_TICKS_AND_SLEEP extern void vPortSuppressTicksAndSleep( portTickType xExpectedIdleTime ); diff --git a/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h index ceea81dbf..88c3ddc3a 100644 --- a/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h +++ b/FreeRTOS/Source/portable/Renesas/RX100/portmacro.h @@ -172,9 +172,6 @@ extern void vTaskExitCritical( void ); #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) -/* This macro is not appropriate for this port so is defined away. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB( x ) - #ifdef __cplusplus } #endif diff --git a/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h b/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h index a3e234f53..c9ef3f132 100644 --- a/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h +++ b/FreeRTOS/Source/portable/Renesas/RX200/portmacro.h @@ -162,9 +162,6 @@ extern void vTaskExitCritical( void ); #define portTASK_FUNCTION_PROTO( vFunction, pvParameters ) void vFunction( void *pvParameters ) #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters ) -/* This macro is not appropriate for this port so is defined away. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB( x ) - #ifdef __cplusplus } #endif diff --git a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h index 9f12a88f1..c6313b21c 100644 --- a/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h +++ b/FreeRTOS/Source/portable/Tasking/ARM_CM4F/portmacro.h @@ -155,10 +155,6 @@ extern void vPortExitCritical( void ); #define portENTER_CRITICAL() vPortEnterCritical() #define portEXIT_CRITICAL() vPortExitCritical() -/* There are an uneven number of items on the initial stack, so -portALIGNMENT_ASSERT_pxCurrentTCB() will trigger false positive asserts. */ -#define portALIGNMENT_ASSERT_pxCurrentTCB ( void ) - /*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. */ diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index abe344066..6232e7eb4 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -540,9 +540,6 @@ tskTCB * pxNewTCB; } #endif /* portUSING_MPU_WRAPPERS */ - /* Check the alignment of the initialised stack. */ - portALIGNMENT_ASSERT_pxCurrentTCB( ( ( ( unsigned long ) pxNewTCB->pxTopOfStack & ( unsigned long ) portBYTE_ALIGNMENT_MASK ) == 0UL ) ); - if( ( void * ) pxCreatedTask != NULL ) { /* Pass the TCB out - in an anonymous way. The calling function/ @@ -1843,10 +1840,10 @@ void vTaskSwitchContext( void ) ulTotalRunTime = portGET_RUN_TIME_COUNTER_VALUE(); #endif - /* Add the amount of time the task has been running to the - accumulated time so far. The time the task started running was - stored in ulTaskSwitchedInTime. Note that there is no overflow - protection here so count values are only valid until the timer + /* Add the amount of time the task has been running to the + accumulated time so far. The time the task started running was + stored in ulTaskSwitchedInTime. Note that there is no overflow + protection here so count values are only valid until the timer overflows. The guard against negative values is to protect against suspect run time stat counter implementations - which are provided by the application, not the kernel. */ -- 2.39.5