Changeset 10f28914 in rtems


Ignore:
Timestamp:
Feb 17, 2016, 10:33:27 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
db329a7
Parents:
358bd740
git-author:
Sebastian Huber <sebastian.huber@…> (02/17/16 10:33:27)
git-committer:
Sebastian Huber <sebastian.huber@…> (02/17/16 10:53:27)
Message:

smptests/smpwakeafter01: Add scheduler config

Update #2554.

Location:
testsuites/smptests/smpwakeafter01
Files:
2 edited

Legend:

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

    r358bd740 r10f28914  
    3131#define INTERVAL_COUNT 8
    3232
     33#define SCHED_A rtems_build_name(' ', ' ', ' ', 'A')
     34
     35#define SCHED_B rtems_build_name(' ', ' ', ' ', 'B')
     36
    3337static rtems_id task_ids[CPU_COUNT][INTERVAL_COUNT];
    3438
     
    7680
    7781  for (i = 0; i < cpu_count; ++i) {
     82    rtems_id scheduler_id;
    7883    uint32_t j;
     84
     85    if (i != 1) {
     86      sc = rtems_scheduler_ident(SCHED_A, &scheduler_id);
     87      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     88    } else {
     89      sc = rtems_scheduler_ident(SCHED_B, &scheduler_id);
     90      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     91    }
    7992
    8093    for (j = 0; j < INTERVAL_COUNT; ++j) {
     
    89102      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
    90103
     104      sc = rtems_task_set_scheduler(task_ids[i][j], scheduler_id);
     105      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     106
    91107      sc = rtems_task_start(task_ids[i][j], task, make_arg(i, j));
    92108      rtems_test_assert(sc == RTEMS_SUCCESSFUL);
     
    143159#define CONFIGURE_SMP_MAXIMUM_PROCESSORS CPU_COUNT
    144160
     161#define CONFIGURE_MAXIMUM_PRIORITY 255
     162
     163#define CONFIGURE_SCHEDULER_PRIORITY_SMP
     164
     165#include <rtems/scheduler.h>
     166
     167RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(a, CONFIGURE_MAXIMUM_PRIORITY + 1);
     168
     169RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP(b, CONFIGURE_MAXIMUM_PRIORITY + 1);
     170
     171#define CONFIGURE_SCHEDULER_CONTROLS \
     172  RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(a, SCHED_A), \
     173  RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(b, SCHED_B)
     174
     175#define CONFIGURE_SMP_SCHEDULER_ASSIGNMENTS \
     176  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_MANDATORY), \
     177  RTEMS_SCHEDULER_ASSIGN(1, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     178  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     179  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     180  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     181  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     182  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     183  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     184  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     185  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     186  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     187  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     188  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     189  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     190  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     191  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     192  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     193  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     194  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     195  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     196  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     197  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     198  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     199  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     200  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     201  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     202  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     203  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     204  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     205  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     206  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL), \
     207  RTEMS_SCHEDULER_ASSIGN(0, RTEMS_SCHEDULER_ASSIGN_PROCESSOR_OPTIONAL)
     208
    145209#define CONFIGURE_MAXIMUM_TASKS (1 + CPU_COUNT * INTERVAL_COUNT)
    146210
Note: See TracChangeset for help on using the changeset viewer.