summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/schedulersetaffinity.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score/src/schedulersetaffinity.c')
-rw-r--r--cpukit/score/src/schedulersetaffinity.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/cpukit/score/src/schedulersetaffinity.c b/cpukit/score/src/schedulersetaffinity.c
index 3d354800b2..00d1a8b207 100644
--- a/cpukit/score/src/schedulersetaffinity.c
+++ b/cpukit/score/src/schedulersetaffinity.c
@@ -36,6 +36,13 @@ bool _Scheduler_Set_affinity(
return false;
}
+ /*
+ * Reduce affinity set to the online processors to be in line with
+ * _Thread_Initialize() which sets the default affinity to the set of online
+ * processors.
+ */
+ _Processor_mask_And( &affinity, &_SMP_Online_processors, &affinity );
+
scheduler = _Thread_Scheduler_get_home( the_thread );
_Scheduler_Acquire_critical( scheduler, &lock_context );