mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -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;
|
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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue