]> git.sur5r.net Git - freertos/commitdiff
Optimised vListInsert() in the case when the wake time is the maximum tick count...
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 3 Jul 2006 19:32:59 +0000 (19:32 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 3 Jul 2006 19:32:59 +0000 (19:32 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@17 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/list.c

index 768eb21d259d7b65ffd58ec8ba918ea1dbb61b1d..2d24e68c83d03dd9e7a7d7813d12e55311d68181 100644 (file)
@@ -71,6 +71,11 @@ Changes from V3.2.4
 \r
        + Changed the volatile definitions of some structure members to clean up\r
          the code where the list structures are used.\r
+\r
+Changes from V4.0.4\r
+\r
+       + Optimised vListInsert() in the case when the wake time is the maximum \r
+         tick count value.\r
 */\r
 \r
 #include <stdlib.h>\r
@@ -148,11 +153,7 @@ portTickType xValueOfInsertion;
        algorithm slightly if necessary. */\r
        if( xValueOfInsertion == portMAX_DELAY )\r
        {\r
-               for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue < xValueOfInsertion; pxIterator = pxIterator->pxNext )\r
-               {\r
-                       /* There is nothing to do here, we are just iterating to the\r
-                       wanted insertion position. */\r
-               }\r
+               pxIterator = pxList->xListEnd.pxPrevious;\r
        }\r
        else\r
        {\r