Changeset 77ff5599 in rtems for testsuites/smptests


Ignore:
Timestamp:
Jun 10, 2016, 6:48:54 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
7ec66e08
Parents:
b8f76fa
git-author:
Sebastian Huber <sebastian.huber@…> (06/10/16 06:48:54)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/22/16 12:36:40)
Message:

score: Introduce map priority scheduler operation

Introduce map/unmap priority scheduler operations to map thread priority
values from/to the user domain to/from the scheduler domain. Use the
map priority operation to validate the thread priority. The EDF
schedulers use this new operation to distinguish between normal
priorities and priorities obtain through a job release.

Update #2173.
Update #2556.

Location:
testsuites/smptests
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • testsuites/smptests/Makefile.am

    rb8f76fa r77ff5599  
    4646SUBDIRS += smppsxaffinity01
    4747SUBDIRS += smppsxaffinity02
     48SUBDIRS += smppsxmutex01
    4849SUBDIRS += smppsxsignal01
    4950endif
  • testsuites/smptests/configure.ac

    rb8f76fa r77ff5599  
    5858# Explicitly list all Makefiles here
    5959AC_CONFIG_FILES([Makefile
     60smppsxmutex01/Makefile
    6061smpstrongapa01/Makefile
    6162smp01/Makefile
  • testsuites/smptests/smpscheduler02/init.c

    rb8f76fa r77ff5599  
    3636static rtems_id main_task_id;
    3737
     38static rtems_id sema_id;
     39
    3840static void task(rtems_task_argument arg)
    3941{
     
    4547  rtems_test_assert(sched_get_priority_min(SCHED_RR) == 1);
    4648  rtems_test_assert(sched_get_priority_max(SCHED_RR) == 126);
     49
     50  sc = rtems_semaphore_obtain(sema_id, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
     51  rtems_test_assert(sc == RTEMS_NOT_DEFINED);
    4752
    4853  sc = rtems_event_transient_send(main_task_id);
     
    6267  rtems_id scheduler_b_id;
    6368  rtems_id scheduler_c_id;
     69  rtems_task_priority prio;
    6470  cpu_set_t cpuset;
    6571  cpu_set_t first_cpu;
     
    95101  sc = rtems_scheduler_ident(SCHED_C, &scheduler_c_id);
    96102  rtems_test_assert(sc == RTEMS_UNSATISFIED);
     103
     104  sc = rtems_semaphore_create(
     105    SCHED_A,
     106    1,
     107    RTEMS_BINARY_SEMAPHORE | RTEMS_PRIORITY | RTEMS_PRIORITY_CEILING,
     108    1,
     109    &sema_id
     110  );
     111  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     112
     113  prio = 2;
     114  sc = rtems_semaphore_set_priority(sema_id, scheduler_a_id, prio, &prio);
     115  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     116  rtems_test_assert(prio == 1);
     117
     118  if (cpu_count > 1) {
     119    prio = 1;
     120    sc = rtems_semaphore_set_priority(sema_id, scheduler_b_id, prio, &prio);
     121    rtems_test_assert(sc == RTEMS_NOT_DEFINED);
     122    rtems_test_assert(prio == 2);
     123  }
    97124
    98125  CPU_ZERO(&cpuset);
     
    183210  sc = rtems_task_delete(task_id);
    184211  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     212
     213  sc = rtems_semaphore_delete(sema_id);
     214  rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    185215}
    186216
     
    213243#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
    214244
     245#define CONFIGURE_MAXIMUM_TASKS 2
     246#define CONFIGURE_MAXIMUM_SEMAPHORES 1
     247
    215248#define CONFIGURE_SMP_APPLICATION
    216249
     
    270303  RTEMS_SCHEDULER_ASSIGN(2, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
    271304
    272 #define CONFIGURE_MAXIMUM_TASKS 2
    273 
    274305#define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION
    275306
Note: See TracChangeset for help on using the changeset viewer.