From edc1e01eab362a1cf7103b4e360aa9d2db8fbda1 Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Fri, 12 Jan 2007 08:10:04 +0000 Subject: [PATCH] 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). --- Source/tasks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.