From e756b250d43bd44007011f6ba9d2e6c649f9734f Mon Sep 17 00:00:00 2001 From: richardbarry Date: Wed, 22 Sep 2010 22:03:40 +0000 Subject: [PATCH] Replace asm wrappers to interrupt handlers with functions that use the interrupt attribute. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1128 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/GCC/RX600/port.c | 10 +++------- Source/portable/GCC/RX600/portmacro.h | 4 ---- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/Source/portable/GCC/RX600/port.c b/Source/portable/GCC/RX600/port.c index 76afa3cfa..5ff53c18c 100644 --- a/Source/portable/GCC/RX600/port.c +++ b/Source/portable/GCC/RX600/port.c @@ -98,7 +98,7 @@ void vSoftwareInterruptISR( void ) __attribute__((naked)); /* * The tick interrupt handler. */ -void vTickISR( void ) __attribute__((naked)); +void vTickISR( void ) __attribute__((interrupt)); /*-----------------------------------------------------------*/ @@ -336,9 +336,8 @@ void vSoftwareInterruptISR( void ) void vTickISR( void ) { - /* This is a naked function. This macro saves registers then re-enables - interrupts. */ - portENTER_INTERRUPT(); + /* Re-enabled interrupts. */ + __asm volatile( "SETPSW I" ); /* Increment the tick, and perform any processing the new tick value necessitates. Ensure IPL is at the max syscall value first. */ @@ -352,9 +351,6 @@ void vTickISR( void ) #if( configUSE_PREEMPTION == 1 ) taskYIELD(); #endif - - /* Retore registers, then return. */ - portEXIT_INTERRUPT(); } /*-----------------------------------------------------------*/ diff --git a/Source/portable/GCC/RX600/portmacro.h b/Source/portable/GCC/RX600/portmacro.h index e20383188..1910923f2 100644 --- a/Source/portable/GCC/RX600/portmacro.h +++ b/Source/portable/GCC/RX600/portmacro.h @@ -122,10 +122,6 @@ void vPortSetIPL( unsigned long ulNewIPL ) __attribute__((naked)); #define portSET_INTERRUPT_MASK_FROM_ISR() ulPortGetIPL(); portDISABLE_INTERRUPTS() #define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedInterruptStatus ) vPortSetIPL( uxSavedInterruptStatus ) -#define portENTER_INTERRUPT() __asm volatile( "PUSHM R1-R15 \t\n SETPSW I" ) -#define portEXIT_INTERRUPT() __asm volatile( "POPM R1-R15 \t\n RTE" ) - - /*-----------------------------------------------------------*/ /* Task function macros as described on the FreeRTOS.org WEB site. */ -- 2.39.5