Changeset 4a1bdd30 in rtems for testsuites/smptests


Ignore:
Timestamp:
Jul 7, 2017, 6:30:20 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
21389c06
Parents:
34487537
git-author:
Sebastian Huber <sebastian.huber@…> (07/07/17 06:30:20)
git-committer:
Sebastian Huber <sebastian.huber@…> (07/10/17 05:49:40)
Message:

score: Fix set scheduler

Ensure that the thread processor affinity fits the new scheduler
instance.

Update #3059.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/smptests/smpscheduler02/init.c

    r34487537 r4a1bdd30  
    4848  rtems_test_assert(rtems_get_current_processor() == 1);
    4949  rtems_test_assert(sched_get_priority_min(SCHED_RR) == 1);
    50   rtems_test_assert(sched_get_priority_max(SCHED_RR) == 126);
     50  rtems_test_assert(sched_get_priority_max(SCHED_RR) == INT_MAX - 1);
    5151
    5252  sc = rtems_semaphore_obtain(cmtx_id, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     
    346346    rtems_test_assert(scheduler_id == scheduler_b_id);
    347347
     348    sc = rtems_task_set_affinity(task_id, sizeof(online_cpus), &online_cpus);
     349    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     350
    348351    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);
    352     rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     352    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     353
     354    sc = rtems_task_set_scheduler(task_id, scheduler_a_id, 1);
     355    rtems_test_assert(sc == RTEMS_UNSATISFIED);
    353356
    354357    sc = rtems_task_get_scheduler(task_id, &scheduler_id);
     
    416419#define CONFIGURE_MAXIMUM_PROCESSORS 64
    417420
     421#define CONFIGURE_SCHEDULER_EDF_SMP
    418422#define CONFIGURE_SCHEDULER_PRIORITY_SMP
    419423#define CONFIGURE_SCHEDULER_SIMPLE_SMP
     
    423427RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(a, 256);
    424428
    425 RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(b, 128);
     429RTEMS_SCHEDULER_CONTEXT_EDF_SMP(b, CONFIGURE_MAXIMUM_PROCESSORS);
    426430
    427431RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(c);
     
    429433#define CONFIGURE_SCHEDULER_CONTROLS \
    430434  RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(a, SCHED_A), \
    431   RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(b, SCHED_B), \
     435  RTEMS_SCHEDULER_CONTROL_EDF_SMP(b, SCHED_B), \
    432436  RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(c, SCHED_C)
    433437
Note: See TracChangeset for help on using the changeset viewer.