From 56d94df0a8731098acec85973a0556dede1b591d Mon Sep 17 00:00:00 2001 From: Joseph Julicher Date: Tue, 18 May 2021 15:07:26 -0700 Subject: [PATCH] Fixed bit mask compare bug --- tasks.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks.c b/tasks.c index ae038e872..4b7c99d15 100644 --- a/tasks.c +++ b/tasks.c @@ -894,7 +894,7 @@ static void prvYieldForTask( TCB_t * pxTCB, if( pxTCB->xTaskRunState == taskTASK_NOT_RUNNING ) { #if ( configUSE_CORE_AFFINITY == 1 ) - if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) == 1 ) + if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) != 0 ) #endif { /* If the task is not being executed by any core swap it in */ @@ -911,7 +911,7 @@ static void prvYieldForTask( TCB_t * pxTCB, { configASSERT( ( pxTCB->xTaskRunState == xCoreID ) || ( pxTCB->xTaskRunState == taskTASK_YIELDING ) ); #if ( configUSE_CORE_AFFINITY == 1 ) - if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) == 1 ) + if( ( pxTCB->uxCoreAffinityMask & ( 1 << xCoreID ) ) != 0 ) #endif { /* The task is already running on this core, mark it as scheduled */