From: RichardBarry Date: Fri, 8 Aug 2008 15:52:41 +0000 (+0000) Subject: Update to allow interrupt nesting (not yet complete). X-Git-Tag: V5.1.2~258 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a8d7f176253f4f3deb227f5d163770ca55446e87;p=freertos Update to allow interrupt nesting (not yet complete). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@438 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/GCC/ColdFire_V2/port.c b/Source/portable/GCC/ColdFire_V2/port.c index 409d8be26..d55e25630 100644 --- a/Source/portable/GCC/ColdFire_V2/port.c +++ b/Source/portable/GCC/ColdFire_V2/port.c @@ -158,20 +158,16 @@ void vPortExitCritical( void ) } /*-----------------------------------------------------------*/ -unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR( void ) +void vPortYieldHandler( void ) { - return 0; -} -/*-----------------------------------------------------------*/ +unsigned portLONG ulSavedInterruptMask; -void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE uxSavedInterruptMask ) -{ -} - -void vPortClearYield( void ) -{ /* -32 as we are using the high word of the 64bit mask. */ MCF_INTC0_INTFRCH &= ~( 1UL << ( configYIELD_INTERRUPT_VECTOR - 32UL ) ); + + ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR(); + vTaskSwitchContext(); + portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask ); } diff --git a/Source/portable/GCC/ColdFire_V2/portasm.S b/Source/portable/GCC/ColdFire_V2/portasm.S index 84be3b729..a80f3bd51 100644 --- a/Source/portable/GCC/ColdFire_V2/portasm.S +++ b/Source/portable/GCC/ColdFire_V2/portasm.S @@ -73,8 +73,7 @@ ulPortSetIPL: /* Yield interrupt. */ __cs3_isr_interrupt_127: portSAVE_CONTEXT - jsr vPortClearYield - jsr vTaskSwitchContext + jsr vPortYieldHandler portRESTORE_CONTEXT /********************************************************************/ diff --git a/Source/portable/GCC/ColdFire_V2/portmacro.h b/Source/portable/GCC/ColdFire_V2/portmacro.h index 248d8bdd0..3615da743 100644 --- a/Source/portable/GCC/ColdFire_V2/portmacro.h +++ b/Source/portable/GCC/ColdFire_V2/portmacro.h @@ -88,7 +88,7 @@ extern "C" { #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) /*-----------------------------------------------------------*/ unsigned portLONG ulPortSetIPL( unsigned portLONG ); -#define portDISABLE_INTERRUPTS() ulPortSetIPL( configKERNEL_INTERRUPT_PRIORITY ) +#define portDISABLE_INTERRUPTS() ulPortSetIPL( configMAX_SYSCALL_INTERRUPT_PRIORITY ) #define portENABLE_INTERRUPTS() ulPortSetIPL( 0 ) @@ -99,8 +99,8 @@ extern void vPortExitCritical( void ); extern unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR( void ); extern void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE ); -#define portSET_INTERRUPT_MASK_FROM_ISR() uxPortSetInterruptMaskFromISR() -#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) vPortClearInterruptMaskFromISR( uxSavedStatusRegister ) +#define portSET_INTERRUPT_MASK_FROM_ISR() ulPortSetIPL( configMAX_SYSCALL_INTERRUPT_PRIORITY ) +#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) ulPortSetIPL( uxSavedStatusRegister ) /*-----------------------------------------------------------*/