diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-07 07:36:52 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-07-07 07:56:24 +0200 |
commit | 16347a6b3910b04932225f1ea296a7adf206ec9e (patch) | |
tree | 1599a808014267641916c3ed0d2cf80f637774e9 /testsuites/smptests | |
parent | score: Introduce _SMP_Get_online_processors() (diff) | |
download | rtems-16347a6b3910b04932225f1ea296a7adf206ec9e.tar.bz2 |
score: Fix default set affinity
The set of online processors must be a subset of the thread processor
affinity for the schedulers without arbitrary processor affinity support
to avoid problems in case of processor addition and removal.
Update #3059.
Diffstat (limited to 'testsuites/smptests')
-rw-r--r-- | testsuites/smptests/smpscheduler02/init.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/testsuites/smptests/smpscheduler02/init.c b/testsuites/smptests/smpscheduler02/init.c index db7d863991..a15218b368 100644 --- a/testsuites/smptests/smpscheduler02/init.c +++ b/testsuites/smptests/smpscheduler02/init.c @@ -223,9 +223,7 @@ static void test(void) CPU_ZERO(&second_cpu); CPU_SET(1, &second_cpu); - CPU_ZERO(&all_cpus); - CPU_SET(0, &all_cpus); - CPU_SET(1, &all_cpus); + CPU_FILL(&all_cpus); CPU_ZERO(&online_cpus); CPU_SET(0, &online_cpus); @@ -348,6 +346,9 @@ static void test(void) rtems_test_assert(scheduler_id == scheduler_b_id); sc = rtems_task_set_affinity(task_id, sizeof(second_cpu), &second_cpu); + rtems_test_assert(sc == RTEMS_INVALID_NUMBER); + + sc = rtems_task_set_affinity(task_id, sizeof(online_cpus), &online_cpus); rtems_test_assert(sc == RTEMS_SUCCESSFUL); sc = rtems_task_get_scheduler(task_id, &scheduler_id); |