RX GCC port - Introduce macros that perform the interrupt entry and exit manually, then move the asm code back as naked functions within the port.c file.

This commit is contained in:
Richard Barry 2010-09-20 20:01:00 +00:00
parent c788ecec17
commit 0ef04cd7bd
3 changed files with 169 additions and 219 deletions

View file

@ -117,11 +117,15 @@ extern void vTaskExitCritical( void );
#define portEXIT_CRITICAL() vTaskExitCritical();
/* As this port allows interrupt nesting... */
unsigned long ulPortGetIPL( void );
void vPortSetIPL( unsigned long ulNewIPL );
unsigned long ulPortGetIPL( void ) __attribute__((naked));
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. */