mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-06-06 04:19:05 -04:00
Add critical section around xTaskCheckForTimeout() as the new queue code makes a call while the scheduler is not locked.
This commit is contained in:
parent
5ebd39bfc9
commit
ed28aa2046
|
@ -1560,6 +1560,8 @@ portBASE_TYPE xTaskCheckForTimeOut( xTimeOutType * const pxTimeOut, portTickType
|
|||
{
|
||||
portBASE_TYPE xReturn;
|
||||
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
#if ( INCLUDE_vTaskSuspend == 1 )
|
||||
/* If INCLUDE_vTaskSuspend is set to 1 and the block time specified is
|
||||
the maximum block time then the task should block indefinitely, and
|
||||
|
@ -1590,6 +1592,8 @@ portBASE_TYPE xReturn;
|
|||
{
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue