Add critical section around xTaskCheckForTimeout() as the new queue code makes a call while the scheduler is not locked.

This commit is contained in:
Richard Barry 2008-03-23 16:00:51 +00:00
parent 5ebd39bfc9
commit ed28aa2046

View file

@ -1560,6 +1560,8 @@ portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType * const pxTimeOut, portTickType
{ {
portBASE_TYPE xReturn; portBASE_TYPE xReturn;
portENTER_CRITICAL();
{
#if ( INCLUDE_vTaskSuspend == 1 ) #if ( INCLUDE_vTaskSuspend == 1 )
/* If INCLUDE_vTaskSuspend is set to 1 and the block time specified is /* If INCLUDE_vTaskSuspend is set to 1 and the block time specified is
the maximum block time then the task should block indefinitely, and the maximum block time then the task should block indefinitely, and
@ -1590,6 +1592,8 @@ portBASE_TYPE xReturn;
{ {
xReturn = pdTRUE; xReturn = pdTRUE;
} }
}
portEXIT_CRITICAL();
return xReturn; return xReturn;
} }