summaryrefslogtreecommitdiff
path: root/Source/list.c
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2006-07-03 19:32:59 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2006-07-03 19:32:59 +0000
commit74147a5df6b5dc7b7a2de2145402a7a74aceb989 (patch)
tree8248f9cfd7953febdd522a7a8dabe4b65ee07f9a /Source/list.c
parenta6a56f70f0e9d77ce9363c68fea50a3cad2b4d7b (diff)
downloadfreertos-74147a5df6b5dc7b7a2de2145402a7a74aceb989.tar.gz
freertos-74147a5df6b5dc7b7a2de2145402a7a74aceb989.tar.bz2
freertos-74147a5df6b5dc7b7a2de2145402a7a74aceb989.tar.xz
Optimised vListInsert() in the case when the wake time is the maximum tick count value.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@17 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Source/list.c')
-rw-r--r--Source/list.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/list.c b/Source/list.c
index 768eb21d..2d24e68c 100644
--- a/Source/list.c
+++ b/Source/list.c
@@ -71,6 +71,11 @@ Changes from V3.2.4
+ Changed the volatile definitions of some structure members to clean up
the code where the list structures are used.
+
+Changes from V4.0.4
+
+ + Optimised vListInsert() in the case when the wake time is the maximum
+ tick count value.
*/
#include <stdlib.h>
@@ -148,11 +153,7 @@ portTickType xValueOfInsertion;
algorithm slightly if necessary. */
if( xValueOfInsertion == portMAX_DELAY )
{
- for( pxIterator = ( xListItem * ) &( pxList->xListEnd ); pxIterator->pxNext->xItemValue < xValueOfInsertion; pxIterator = pxIterator->pxNext )
- {
- /* There is nothing to do here, we are just iterating to the
- wanted insertion position. */
- }
+ pxIterator = pxList->xListEnd.pxPrevious;
}
else
{