This commit is contained in:
Harsh Abasaheb Chavan 2026-05-07 21:36:00 +03:00 committed by GitHub
commit 549d1456e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

15
tasks.c
View file

@ -4889,9 +4889,14 @@ BaseType_t xTaskIncrementTick( void )
for( xCoreID = 0; xCoreID < ( ( BaseType_t ) configNUMBER_OF_CORES ); xCoreID++ )
{
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCBs[ xCoreID ]->uxPriority ] ) ) > 1U )
{
#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
if( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable == pdFALSE )
#endif
{
xYieldPendings[ xCoreID ] = pdTRUE;
}
}
else
{
mtCOVERAGE_TEST_MARKER();
@ -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