summaryrefslogtreecommitdiff
path: root/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
diff options
context:
space:
mode:
authorRichard Barry <ribarry@amazon.com>2013-06-08 18:36:25 +0000
committerRichard Barry <ribarry@amazon.com>2013-06-08 18:36:25 +0000
commit62c0ae09265aad31d44292eed6da68b042fcfb29 (patch)
tree3746ae141d696c93125a45e206ee9ef474f3c103 /FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
parentc75c01ffdfdb3c8aa8cf85a1708e7deebe08c337 (diff)
downloadfreertos-git-62c0ae09265aad31d44292eed6da68b042fcfb29.tar.gz
Update port layers to make better use of the xTaskIncrementTick() return value.
Diffstat (limited to 'FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s')
-rw-r--r--FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s6
1 files changed, 4 insertions, 2 deletions
diff --git a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
index 95995e360..dd832a0c0 100644
--- a/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
+++ b/FreeRTOS/Source/portable/RVDS/ARM7_LPC21xx/portASM.s
@@ -130,11 +130,13 @@ vPreemptiveTick
LDR R0, =xTaskIncrementTick ; Increment the tick count.
MOV LR, PC ; This may make a delayed task ready
BX R0 ; to run.
-
+
+ CMP R0, #0
+ BEQ SkipContextSwitch
LDR R0, =vTaskSwitchContext ; Find the highest priority task that
MOV LR, PC ; is ready to run.
BX R0
-
+SkipContextSwitch
MOV R0, #T0MATCHBIT ; Clear the timer event
LDR R1, =T0IR
STR R0, [R1]