]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
Update version number ready for version 9 release candidate 1.
[freertos] / FreeRTOS / Source / portable / IAR / AtmelSAM7S64 / portasm.s79
index 8752bec8ade2c657e3b0121e3a2f1a329d16cfb1..e87c2aeebc1bca8fcff9aee98daf74020caa0687 100644 (file)
@@ -1,5 +1,6 @@
 ;/*\r
-;    FreeRTOS V7.4.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+;    FreeRTOS V9.0.0rc1 - Copyright (C) 2016 Real Time Engineers Ltd.\r
+;    All rights reserved\r
 ;\r
 ;\r
 ;    ***************************************************************************\r
@@ -74,10 +75,10 @@ vPortStartFirstTask:
 ; Manual context switch function.  This is the SWI hander.\r
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\r
 vPortYieldProcessor:\r
-       ADD             LR, LR, #4                      ; Add 4 to the LR to make the LR appear exactly \r
-                                                               ; as if the context was saved during and IRQ \r
+       ADD             LR, LR, #4                      ; Add 4 to the LR to make the LR appear exactly\r
+                                                               ; as if the context was saved during and IRQ\r
                                                                ; handler.\r
-                                                               \r
+\r
        portSAVE_CONTEXT                        ; Save the context of the current task...\r
        LDR R0, =vTaskSwitchContext     ; before selecting the next task to execute.\r
        mov     lr, pc\r
@@ -94,10 +95,13 @@ vPortPreemptiveTick:
        LDR R0, =xTaskIncrementTick ; Increment the tick count - this may wake a task.\r
        mov lr, pc\r
        BX R0\r
+\r
+       CMP R0, #0\r
+       BEQ SkipContextSwitch\r
        LDR R0, =vTaskSwitchContext ; Select the next task to execute.\r
        mov lr, pc\r
        BX R0\r
-\r
+SkipContextSwitch\r
        LDR     R14, =AT91C_BASE_PITC   ; Clear the PIT interrupt\r
        LDR     R0, [R14, #PITC_PIVR ]\r
 \r