From 4fb5c5c9c2bd75de525eca8369ba6bf0d674b9e4 Mon Sep 17 00:00:00 2001 From: richardbarry 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). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@59 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- 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. -- 2.39.5