Changeset 2612a0b in rtems for testsuites/smptests


Ignore:
Timestamp:
Nov 2, 2016, 5:36:13 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
f20dfa8
Parents:
16b14cfd
git-author:
Sebastian Huber <sebastian.huber@…> (11/02/16 05:36:13)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/09/16 14:27:29)
Message:

score: Simplify _Scheduler_Get_by_id()

Avoid dead code in non-SMP configurations. Return scheduler identifier
independent of the current processor count of the scheduler via
rtems_scheduler_ident(), since this value may change during run-time.
Check the processor count in _Scheduler_Set() under scheduler lock
protection.

Update #2797.

File:
1 edited

Legend:

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

    r16b14cfd r2612a0b  
    109109
    110110  sc = rtems_scheduler_ident(SCHED_C, &scheduler_c_id);
    111   rtems_test_assert(sc == RTEMS_UNSATISFIED);
     111  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    112112
    113113  sc = rtems_semaphore_create(
     
    183183  rtems_test_assert(sched_get_priority_max(SCHED_RR) == 254);
    184184
     185  sc = rtems_task_set_scheduler(task_id, scheduler_c_id, 1);
     186  rtems_test_assert(sc == RTEMS_UNSATISFIED);
     187
     188  sc = rtems_task_set_scheduler(task_id, scheduler_c_id + 1, 1);
     189  rtems_test_assert(sc == RTEMS_INVALID_ID);
     190
    185191  if (cpu_count > 1) {
    186192    sc = rtems_task_set_scheduler(task_id, scheduler_b_id, 1);
    187193    rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    188 
    189     sc = rtems_task_set_scheduler(task_id, scheduler_b_id + 1, 1);
    190     rtems_test_assert(sc == RTEMS_INVALID_ID);
    191194
    192195    sc = rtems_task_get_scheduler(task_id, &scheduler_id);
Note: See TracChangeset for help on using the changeset viewer.