Skip to content

Commit 6369b03

Browse files
committed
fixed additional bit mask test errors
1 parent 56d94df commit 6369b03

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tasks.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ static void prvYieldForTask( TCB_t * pxTCB,
762762
if( xTaskPriority <= xLowestPriority )
763763
{
764764
#if ( configUSE_CORE_AFFINITY == 1 )
765-
if( ( pxTCB->uxCoreAffinityMask & ( 1 << x ) ) == 1 )
765+
if( ( pxTCB->uxCoreAffinityMask & ( 1 << x ) ) != 0 )
766766
#endif
767767
{
768768
#if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
@@ -1608,11 +1608,13 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
16081608
if( pxCurrentTCBs[ xCoreID ] == NULL )
16091609
{
16101610
pxNewTCB->xTaskRunState = xCoreID;
1611+
/* This section of code pins the idle tasks to cores.
16111612
#if ( configUSE_CORE_AFFINITY == 1 )
16121613
{
16131614
pxNewTCB->uxCoreAffinityMask = ( 1 << xCoreID );
16141615
}
16151616
#endif
1617+
*/
16161618
pxCurrentTCBs[ xCoreID ] = pxNewTCB;
16171619
break;
16181620
}
@@ -2240,7 +2242,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
22402242
{
22412243
xCoreID = ( BaseType_t ) pxTCB->xTaskRunState;
22422244

2243-
if( ( uxCoreAffinityMask & ( 1 << xCoreID ) ) != 1 )
2245+
if( ( uxCoreAffinityMask & ( 1 << xCoreID ) ) != 0 )
22442246
{
22452247
prvYieldCore( xCoreID );
22462248
}

0 commit comments

Comments
 (0)