Skip to content

Commit 56d94df

Browse files
committed
Fixed bit mask compare bug
1 parent d59bfca commit 56d94df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tasks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ static void prvYieldForTask( TCB_t * pxTCB,
894894
if( pxTCB->xTaskRunState == taskTASK_NOT_RUNNING )
895895
{
896896
#if ( configUSE_CORE_AFFINITY == 1 )
897-
if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) == 1 )
897+
if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) != 0 )
898898
#endif
899899
{
900900
/* If the task is not being executed by any core swap it in */
@@ -911,7 +911,7 @@ static void prvYieldForTask( TCB_t * pxTCB,
911911
{
912912
configASSERT( ( pxTCB->xTaskRunState == xCoreID ) || ( pxTCB->xTaskRunState == taskTASK_YIELDING ) );
913913
#if ( configUSE_CORE_AFFINITY == 1 )
914-
if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) == 1 )
914+
if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) != 0 )
915915
#endif
916916
{
917917
/* The task is already running on this core, mark it as scheduled */

0 commit comments

Comments
 (0)