From: richardbarry Date: Fri, 12 Jan 2007 08:10:04 +0000 (+0000) Subject: Bug fix in xTaskCheckForTimeOut() in the case where the tick count has incremented... X-Git-Tag: V4.2.0~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4fb5c5c9c2bd75de525eca8369ba6bf0d674b9e4;p=freertos Bug fix in xTaskCheckForTimeOut() in the case where the tick count has incremented by exactly portMAX_DELAY ticks between two calls (i.e. extremely unlikely). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@59 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/tasks.c b/Source/tasks.c index 0fcf4a89e..95131e156 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -1540,7 +1540,7 @@ portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType *pxTimeOut, portTickType *pxTic { portBASE_TYPE xReturn; - if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xTickCount > pxTimeOut->xTimeOnEntering ) ) + if( ( xNumOfOverflows != pxTimeOut->xOverflowCount ) && ( xTickCount >= pxTimeOut->xTimeOnEntering ) ) { /* The tick count is greater than the time at which vTaskSetTimeout() was called, but has also overflowed since vTaskSetTimeOut() was called.