mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-05-12 11:42:57 -04:00
Merge a1471c9404 into a8c9d35152
This commit is contained in:
commit
549d1456e0
1 changed files with 16 additions and 1 deletions
17
tasks.c
17
tasks.c
|
|
@ -4890,7 +4890,12 @@ BaseType_t xTaskIncrementTick( void )
|
|||
{
|
||||
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCBs[ xCoreID ]->uxPriority ] ) ) > 1U )
|
||||
{
|
||||
xYieldPendings[ xCoreID ] = pdTRUE;
|
||||
#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
|
||||
if( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable == pdFALSE )
|
||||
#endif
|
||||
{
|
||||
xYieldPendings[ xCoreID ] = pdTRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5222,6 +5227,16 @@ BaseType_t xTaskIncrementTick( void )
|
|||
* SMP port. */
|
||||
configASSERT( portGET_CRITICAL_NESTING_COUNT( xCoreID ) == 0 );
|
||||
|
||||
#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
|
||||
if( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable != pdFALSE )
|
||||
{
|
||||
/* The current task has preemption disabled - do not allow a
|
||||
* context switch. The yield will be performed when preemption
|
||||
* is re-enabled. */
|
||||
xYieldPendings[ xCoreID ] = pdTRUE;
|
||||
}
|
||||
else
|
||||
#endif /* #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 ) */
|
||||
if( uxSchedulerSuspended != ( UBaseType_t ) 0U )
|
||||
{
|
||||
/* The scheduler is currently suspended - do not allow a context
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue