File tree Expand file tree Collapse file tree 4 files changed +88
-67
lines changed Expand file tree Collapse file tree 4 files changed +88
-67
lines changed Original file line number Diff line number Diff line change @@ -2400,7 +2400,8 @@ uxbitstoset
24002400uxbitstowait
24012401uxbitstowaitfor
24022402uxcontrolbits
2403- uxcoreexclude
2403+ uxcoreaffinitymask
2404+ uxcoreaffinityinheritancemask
24042405uxcriticalnesting
24052406uxcurrenteventbits
24062407uxcurrentnumberoftasks
Original file line number Diff line number Diff line change 240240 #define configUSE_TASK_PREEMPTION_DISABLE 0
241241#endif
242242
243- #ifndef configUSE_CORE_EXCLUSION
244- #define configUSE_CORE_EXCLUSION 0
243+ #ifndef configUSE_CORE_AFFINITY
244+ #define configUSE_CORE_AFFINITY 0
245245#endif
246246
247247#ifndef configUSE_ALTERNATIVE_API
948948 #error configUSE_MUTEXES must be set to 1 to use recursive mutexes
949949#endif
950950
951- #if ( ( configRUN_MULTIPLE_PRIORITIES == 0 ) && ( configUSE_CORE_EXCLUSION != 0 ) )
951+ #if ( ( configRUN_MULTIPLE_PRIORITIES == 0 ) && ( configUSE_CORE_AFFINITY != 0 ) )
952952 #error configRUN_MULTIPLE_PRIORITIES must be set to 1 to use core exclusion
953953#endif
954954
@@ -1209,7 +1209,7 @@ typedef struct xSTATIC_TCB
12091209 #if ( configUSE_TASK_PREEMPTION_DISABLE == 1 )
12101210 BaseType_t xDummy24 ;
12111211 #endif
1212- #if ( configUSE_CORE_EXCLUSION == 1 )
1212+ #if ( configUSE_CORE_AFFINITY == 1 && configNUM_CORES > 1 )
12131213 UBaseType_t uxDummy25 ;
12141214 #endif
12151215 #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
Original file line number Diff line number Diff line change @@ -170,6 +170,14 @@ typedef enum
170170 */
171171#define tskIDLE_PRIORITY ( ( UBaseType_t ) 0U )
172172
173+ /**
174+ * Defines affinity to all available cores.
175+ *
176+ */
177+ #define tskNO_AFFINITY ( ( UBaseType_t ) -1U )
178+
179+
180+
173181/**
174182 * task. h
175183 *
@@ -1235,8 +1243,10 @@ void vTaskResume( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION;
12351243 */
12361244BaseType_t xTaskResumeFromISR ( TaskHandle_t xTaskToResume ) PRIVILEGED_FUNCTION ;
12371245
1238- void vTaskCoreExclusionSet ( const TaskHandle_t xTask , UBaseType_t uxCoreExclude );
1239- UBaseType_t vTaskCoreExclusionGet ( const TaskHandle_t xTask );
1246+ #if ( configUSE_CORE_AFFINITY == 1 )
1247+ void vTaskCoreAffinitySet ( const TaskHandle_t xTask , UBaseType_t uxCoreAffinityMask );
1248+ UBaseType_t vTaskCoreAffinityGet ( const TaskHandle_t xTask );
1249+ #endif
12401250
12411251void vTaskPreemptionDisable ( const TaskHandle_t xTask );
12421252void vTaskPreemptionEnable ( const TaskHandle_t xTask );
You can’t perform that action at this time.
0 commit comments