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).

This commit is contained in:
Richard Barry 2007-01-12 08:10:04 +00:00
parent 761aa4aa7c
commit edc1e01eab

View file

@ -1540,7 +1540,7 @@ portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType *pxTimeOut, portTickType *pxTic
{ {
portBASE_TYPE xReturn; 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() /* The tick count is greater than the time at which vTaskSetTimeout()
was called, but has also overflowed since vTaskSetTimeOut() was called. was called, but has also overflowed since vTaskSetTimeOut() was called.