]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/IAR/AtmelSAM7S64/portasm.s79
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Source / portable / IAR / AtmelSAM7S64 / portasm.s79
index 7ad11bfd92436739617d33d9d785637c54ed6d04..1aaacd044a5f29dccb9ea264f982520b51292fcc 100644 (file)
@@ -1,5 +1,6 @@
 ;/*\r
-;    FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+;    FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
+;    All rights reserved\r
 ;\r
 ;\r
 ;    ***************************************************************************\r
@@ -54,7 +55,7 @@
                CODE32\r
 \r
        EXTERN vTaskSwitchContext\r
-       EXTERN vTaskIncrementTick\r
+       EXTERN xTaskIncrementTick\r
 \r
        PUBLIC vPortYieldProcessor\r
        PUBLIC vPortPreemptiveTick\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
@@ -91,13 +92,16 @@ vPortYieldProcessor:
 vPortPreemptiveTick:\r
        portSAVE_CONTEXT                        ; Save the context of the current task.\r
 \r
-       LDR R0, =vTaskIncrementTick ; Increment the tick count - this may wake a task.\r
+       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