]> git.sur5r.net Git - freertos/commitdiff
Update to allow interrupt nesting (not yet complete).
authorRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 8 Aug 2008 15:52:41 +0000 (15:52 +0000)
committerRichardBarry <RichardBarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Fri, 8 Aug 2008 15:52:41 +0000 (15:52 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@438 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/portable/GCC/ColdFire_V2/port.c
Source/portable/GCC/ColdFire_V2/portasm.S
Source/portable/GCC/ColdFire_V2/portmacro.h

index 409d8be2626cfdbfdf926b6fc5caa40fbf1b30bb..d55e256301a6dcc8aa09891396c85e7de38bfeb1 100644 (file)
@@ -158,20 +158,16 @@ void vPortExitCritical( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR( void )\r
+void vPortYieldHandler( void )\r
 {\r
-       return 0;\r
-}\r
-/*-----------------------------------------------------------*/\r
+unsigned portLONG ulSavedInterruptMask;\r
 \r
-void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE uxSavedInterruptMask )\r
-{\r
-}\r
-\r
-void vPortClearYield( void )\r
-{\r
        /* -32 as we are using the high word of the 64bit mask. */\r
        MCF_INTC0_INTFRCH &= ~( 1UL << ( configYIELD_INTERRUPT_VECTOR - 32UL ) );\r
+\r
+       ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR();\r
+               vTaskSwitchContext();\r
+       portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask );\r
 }\r
 \r
 \r
index 84be3b7298b8073783526c5ed86581f8e89a691a..a80f3bd51ce0c29b49ea16c3a7be2590f401b85d 100644 (file)
@@ -73,8 +73,7 @@ ulPortSetIPL:
 /* Yield interrupt. */\r
 __cs3_isr_interrupt_127:\r
        portSAVE_CONTEXT\r
-       jsr vPortClearYield\r
-       jsr vTaskSwitchContext\r
+       jsr vPortYieldHandler\r
        portRESTORE_CONTEXT\r
 \r
 /********************************************************************/\r
index 248d8bdd011d48b71d87e9385036358740f1526a..3615da74332f4f0990761fbaa4f802333f217b0e 100644 (file)
@@ -88,7 +88,7 @@ extern "C" {
 #define portTICK_RATE_MS                       ( ( portTickType ) 1000 / configTICK_RATE_HZ )\r
 /*-----------------------------------------------------------*/\r
 unsigned portLONG ulPortSetIPL( unsigned portLONG );\r
-#define portDISABLE_INTERRUPTS()       ulPortSetIPL( configKERNEL_INTERRUPT_PRIORITY )\r
+#define portDISABLE_INTERRUPTS()       ulPortSetIPL( configMAX_SYSCALL_INTERRUPT_PRIORITY )\r
 #define portENABLE_INTERRUPTS()                ulPortSetIPL( 0 )\r
 \r
 \r
@@ -99,8 +99,8 @@ extern void vPortExitCritical( void );
 \r
 extern unsigned portBASE_TYPE uxPortSetInterruptMaskFromISR( void );\r
 extern void vPortClearInterruptMaskFromISR( unsigned portBASE_TYPE );\r
-#define portSET_INTERRUPT_MASK_FROM_ISR() uxPortSetInterruptMaskFromISR()\r
-#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) vPortClearInterruptMaskFromISR( uxSavedStatusRegister )\r
+#define portSET_INTERRUPT_MASK_FROM_ISR()      ulPortSetIPL( configMAX_SYSCALL_INTERRUPT_PRIORITY )\r
+#define portCLEAR_INTERRUPT_MASK_FROM_ISR( uxSavedStatusRegister ) ulPortSetIPL( uxSavedStatusRegister )\r
 \r
 /*-----------------------------------------------------------*/\r
 \r