From 852f534fbb2a756db5769cc436bbe04462122929 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Mon, 29 Oct 2012 11:38:19 +0000 Subject: [PATCH] Work around compiler bug in CCS5 by replacing the _call_swi() function with a #pragma SWI_ALIAS. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1801 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h index 799933186..b2315dfc2 100644 --- a/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h +++ b/FreeRTOS/Source/portable/CCS/ARM_Cortex-R4/portmacro.h @@ -111,11 +111,13 @@ extern void vPortExitCritical(void); #define portENABLE_INTERRUPTS() asm( " CPSIE I" ) /* Scheduler utilities. */ -#define portYIELD() _call_swi( 0 ) +#pragma SWI_ALIAS( vPortYield, 0 ) +extern void vPortYield( void ); +#define portYIELD() vPortYield() #define portSYS_SSIR1_REG ( * ( ( volatile unsigned long * ) 0xFFFFFFB0 ) ) #define portSYS_SSIR1_SSKEY ( 0x7500UL ) #define portYIELD_WITHIN_API() { portSYS_SSIR1_REG = portSYS_SSIR1_SSKEY; ( void ) portSYS_SSIR1_REG; } -#define portYIELD_FROM_ISR() { portSYS_SSIR1_REG = portSYS_SSIR1_SSKEY; ( void ) portSYS_SSIR1_REG; } +#define portYIELD_FROM_ISR( x ) if( x != pdFALSE ){ portSYS_SSIR1_REG = portSYS_SSIR1_SSKEY; ( void ) portSYS_SSIR1_REG; } /* Architecture specific optimisations. */ #if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1 -- 2.39.5