freertos: fix setting xCoreID for new task

This commit is contained in:
Ivan Grokhotkov 2016-10-11 00:05:15 -06:00
parent 8ee1a05914
commit 924fea7cc0

View File

@ -629,7 +629,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB, TaskFunction_t pxTaskCode
configASSERT( puxStackBuffer != NULL );
configASSERT( pxTaskBuffer != NULL );
configASSERT( (xCoreID>=0 && xCoreID<portNUM_PROCESSORS) || (xCoreID==tskNO_AFFINITY) );
configASSERT( (xCoreID>=0 && xCoreID<portNUM_PROCESSORS) || (xCoreID==tskNO_AFFINITY) );
if( ( pxTaskBuffer != NULL ) && ( puxStackBuffer != NULL ) )
{
@ -637,6 +637,7 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB, TaskFunction_t pxTaskCode
function - use them. */
pxNewTCB = ( TCB_t * ) pxTaskBuffer; /*lint !e740 Unusual cast is ok as the structures are designed to have the same alignment, and the size is checked by an assert. */
pxNewTCB->pxStack = ( StackType_t * ) puxStackBuffer;
pxNewTCB->xCoreID = xCoreID;
#if( tskSTATIC_AND_DYNAMIC_ALLOCATION_POSSIBLE != 0 )
{