From: richardbarry Date: Mon, 3 Jul 2006 19:32:59 +0000 (+0000) Subject: Optimised vListInsert() in the case when the wake time is the maximum tick count... X-Git-Tag: V4.0.5~9 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e99d1aec1b65f6fa786ef739c09c059072139b40;p=freertos Optimised vListInsert() in the case when the wake time is the maximum tick count value. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@17 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/list.c b/Source/list.c index 768eb21d2..2d24e68c8 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 @@ -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 {