Changeset 16347a6 in rtems


Ignore:
Timestamp:
Jul 7, 2017, 5:36:52 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
197a614
Parents:
76d1198
git-author:
Sebastian Huber <sebastian.huber@…> (07/07/17 05:36:52)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/07/17 05:56:24)
Message:

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.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/score/include/rtems/score/schedulerimpl.h

    r76d1198 r16347a6  
    613613)
    614614{
    615   return _Processor_mask_Is_subset(
    616     affinity,
    617     _Scheduler_Get_processors( scheduler )
    618   );
     615  (void) scheduler;
     616  (void) the_thread;
     617  return _Processor_mask_Is_subset( affinity, _SMP_Get_online_processors() );
    619618}
    620619
  • testsuites/smptests/smpscheduler02/init.c

    r76d1198 r16347a6  
    224224  CPU_SET(1, &second_cpu);
    225225
    226   CPU_ZERO(&all_cpus);
    227   CPU_SET(0, &all_cpus);
    228   CPU_SET(1, &all_cpus);
     226  CPU_FILL(&all_cpus);
    229227
    230228  CPU_ZERO(&online_cpus);
     
    349347
    350348    sc = rtems_task_set_affinity(task_id, sizeof(second_cpu), &second_cpu);
     349    rtems_test_assert(sc == RTEMS_INVALID_NUMBER);
     350
     351    sc = rtems_task_set_affinity(task_id, sizeof(online_cpus), &online_cpus);
    351352    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    352353
Note: See TracChangeset for help on using the changeset viewer.