From a2c8db108931eb9abc6f14010ef533c08cb59e9b Mon Sep 17 00:00:00 2001 From: N3xed Date: Fri, 30 Jul 2021 08:58:47 +0200 Subject: [PATCH] Move uxCoreAffinityMask after xMPUSettings (#372) Allows for much easier assembly access to the field. --- tasks.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tasks.c b/tasks.c index 4c9dd481d..fd29d3596 100644 --- a/tasks.c +++ b/tasks.c @@ -242,6 +242,10 @@ typedef struct tskTaskControlBlock /* The old naming convention is used to xMPU_SETTINGS xMPUSettings; /*< The MPU settings are defined as part of the port layer. THIS MUST BE THE SECOND MEMBER OF THE TCB STRUCT. */ #endif + #if ( configUSE_CORE_AFFINITY == 1 && configNUM_CORES > 1 ) + UBaseType_t uxCoreAffinityMask; /*< Used to link the task to certain cores. UBaseType_t must have >= the same number of bits as SMP confNUM_CORES */ + #endif + ListItem_t xStateListItem; /*< The list that the state list item of a task is reference from denotes the state of that task (Ready, Blocked, Suspended ). */ ListItem_t xEventListItem; /*< Used to reference a task from an event list. */ UBaseType_t uxPriority; /*< The priority of the task. 0 is the lowest priority. */ @@ -254,10 +258,6 @@ typedef struct tskTaskControlBlock /* The old naming convention is used to BaseType_t xPreemptionDisable; /*< Used to prevent the task from being preempted */ #endif - #if ( configUSE_CORE_AFFINITY == 1 && configNUM_CORES > 1 ) - UBaseType_t uxCoreAffinityMask; /*< Used to link the task to certain cores. UBaseType_t must have >= the same number of bits as SMP confNUM_CORES */ - #endif - #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) ) StackType_t * pxEndOfStack; /*< Points to the highest valid address for the stack. */ #endif @@ -1009,7 +1009,7 @@ static void prvYieldForTask( TCB_t * pxTCB, { int uxCore = 31UL - ( uint32_t ) __builtin_clz( uxCoreMap ); - xassert( taskVALID_CORE_ID( uxCore ) ); + configASSERT( taskVALID_CORE_ID( uxCore ) ); uxCoreMap &= ~( 1 << uxCore );