]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/IAR/LPC2000/port.c
Convert more ports to use xTaskIncrementTick() in place of vTaskIncrementTick().
[freertos] / FreeRTOS / Source / portable / IAR / LPC2000 / port.c
index e41de310bdf3887a64d0e3c0293feefecc1db483..97259e4eb6170375489e673def3d2a1414030912 100644 (file)
@@ -244,7 +244,7 @@ void vPortEndScheduler( void )
                /* Increment the tick count - which may wake some tasks but as the\r
                preemptive scheduler is not being used any woken task is not given\r
                processor time no matter what its priority. */\r
-               vTaskIncrementTick();\r
+               xTaskIncrementTick();\r
                \r
                /* Ready for the next interrupt. */\r
                T0IR = portTIMER_MATCH_ISR_BIT;\r
@@ -259,12 +259,13 @@ void vPortEndScheduler( void )
        void vPortPreemptiveTick( void )\r
        {\r
                /* Increment the tick counter. */\r
-               vTaskIncrementTick();\r
-       \r
-               /* The new tick value might unblock a task.  Ensure the highest task that\r
-               is ready to execute is the task that will execute when the tick ISR\r
-               exits. */\r
-               vTaskSwitchContext();\r
+               if( xTaskIncrementTick() != pdFALSE )\r
+               {       \r
+                       /* The new tick value might unblock a task.  Ensure the highest task that\r
+                       is ready to execute is the task that will execute when the tick ISR\r
+                       exits. */\r
+                       vTaskSwitchContext();\r
+               }\r
        \r
                /* Ready for the next interrupt. */\r
                T0IR = portTIMER_MATCH_ISR_BIT;\r