@@ -1500,7 +1500,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
1500
1500
if ( pxCurrentTCBs [ xCoreID ]-> uxPreemptionDisable == 0U )
1501
1501
{
1502
1502
/* Core can yield immediately */
1503
- if ( xCorePriority < * pxLowestImmediatePriority )
1503
+ if ( xCorePriority <= * pxLowestImmediatePriority )
1504
1504
{
1505
1505
* pxLowestImmediatePriority = xCorePriority ;
1506
1506
* pxImmediateYieldCore = xCoreID ;
@@ -1510,7 +1510,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
1510
1510
{
1511
1511
/* Core could yield if preemption were enabled */
1512
1512
if ( ( pxPendingYieldCore != NULL ) && ( pxLowestPendingPriority != NULL ) &&
1513
- ( xCorePriority < * pxLowestPendingPriority ) )
1513
+ ( xCorePriority <= * pxLowestPendingPriority ) )
1514
1514
{
1515
1515
* pxLowestPendingPriority = xCorePriority ;
1516
1516
* pxPendingYieldCore = xCoreID ;
@@ -1520,7 +1520,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) PRIVILEGED_FUNCTION;
1520
1520
/* Preemption disable not configured, can yield immediately */
1521
1521
( void ) pxPendingYieldCore ;
1522
1522
( void ) pxLowestPendingPriority ;
1523
- if ( xCorePriority < * pxLowestImmediatePriority )
1523
+ if ( xCorePriority <= * pxLowestImmediatePriority )
1524
1524
{
1525
1525
* pxLowestImmediatePriority = xCorePriority ;
1526
1526
* pxImmediateYieldCore = xCoreID ;
@@ -5356,7 +5356,7 @@ BaseType_t xTaskIncrementTick( void )
5356
5356
#if ( configNUMBER_OF_CORES == 1 )
5357
5357
{
5358
5358
/* For single core the core ID is always 0. */
5359
- if ( xYieldPendings [ 0 ] != pdFALSE )
5359
+ if ( xYieldPendings [ 0 ] != pdFALSE || xTaskHigherPriorityTasksReady ( 0 ) != pdFALSE )
5360
5360
{
5361
5361
xSwitchRequired = pdTRUE ;
5362
5362
}
@@ -5376,7 +5376,7 @@ BaseType_t xTaskIncrementTick( void )
5376
5376
if ( pxCurrentTCBs [ xCoreID ]-> uxPreemptionDisable == 0U )
5377
5377
#endif
5378
5378
{
5379
- if ( xYieldPendings [ xCoreID ] != pdFALSE )
5379
+ if ( xYieldPendings [ xCoreID ] != pdFALSE || xTaskHigherPriorityTasksReady ( xCoreID ) != pdFALSE )
5380
5380
{
5381
5381
if ( xCoreID == xCurrentCoreID )
5382
5382
{
@@ -8050,10 +8050,9 @@ static void prvResetNextTaskUnblockTime( void )
8050
8050
8051
8051
#if ( ( portUSING_GRANULAR_LOCKS == 1 ) && ( configNUMBER_OF_CORES > 1 ) )
8052
8052
8053
- BaseType_t xTaskHigherPriorityTasksReady ( void )
8053
+ BaseType_t xTaskHigherPriorityTasksReady ( BaseType_t xCoreID )
8054
8054
{
8055
8055
BaseType_t xReturn = pdFALSE ;
8056
- BaseType_t xCoreID = portGET_CORE_ID ();
8057
8056
8058
8057
/* Only check if scheduler is running and not suspended */
8059
8058
if ( ( xSchedulerRunning != pdFALSE ) && ( uxSchedulerSuspended == pdFALSE ) )
0 commit comments