Skip to content

Commit 0c13813

Browse files
authored
Merge branch 'smp' into smp
2 parents ec943bc + d58750f commit 0c13813

File tree

4 files changed

+88
-67
lines changed

4 files changed

+88
-67
lines changed

.github/lexicon.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2400,7 +2400,8 @@ uxbitstoset
24002400
uxbitstowait
24012401
uxbitstowaitfor
24022402
uxcontrolbits
2403-
uxcoreexclude
2403+
uxcoreaffinitymask
2404+
uxcoreaffinityinheritancemask
24042405
uxcriticalnesting
24052406
uxcurrenteventbits
24062407
uxcurrentnumberoftasks

include/FreeRTOS.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@
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
@@ -948,7 +948,7 @@
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 ) )

include/task.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff 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
*/
12361244
BaseType_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

12411251
void vTaskPreemptionDisable( const TaskHandle_t xTask );
12421252
void vTaskPreemptionEnable( const TaskHandle_t xTask );

0 commit comments

Comments
 (0)