Changeset f3d9f228 in rtems for cpukit/sapi


Ignore:
Timestamp:
Jun 26, 2017, 8:35:45 AM (2 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
74f9db8
Parents:
15dbc71
git-author:
Sebastian Huber <sebastian.huber@…> (06/26/17 08:35:45)
git-committer:
Sebastian Huber <sebastian.huber@…> (06/29/17 09:28:32)
Message:

score: Add SMP EDF scheduler

Update #3056.

Location:
cpukit/sapi/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/sapi/include/confdefs.h

    r15dbc71 rf3d9f228  
    781781 *  - CONFIGURE_SCHEDULER_SIMPLE_SMP - Simple SMP Priority Scheduler
    782782 *  - CONFIGURE_SCHEDULER_EDF - EDF Scheduler
     783 *  - CONFIGURE_SCHEDULER_EDF_SMP - EDF SMP Scheduler
    783784 *  - CONFIGURE_SCHEDULER_CBS - CBS Scheduler
    784785 *  - CONFIGURE_SCHEDULER_USER  - user provided scheduler
     
    806807    !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) && \
    807808    !defined(CONFIGURE_SCHEDULER_EDF) && \
     809    !defined(CONFIGURE_SCHEDULER_EDF_SMP) && \
    808810    !defined(CONFIGURE_SCHEDULER_CBS)
    809811  #if defined(RTEMS_SMP) && CONFIGURE_MAXIMUM_PROCESSORS > 1
     
    977979    #define CONFIGURE_SCHEDULER_CONTROLS \
    978980      RTEMS_SCHEDULER_CONTROL_EDF(dflt, CONFIGURE_SCHEDULER_NAME)
     981  #endif
     982#endif
     983
     984/*
     985 * If the EDF SMP Scheduler is selected, then configure for it.
     986 */
     987#if defined(CONFIGURE_SCHEDULER_EDF_SMP)
     988  #if !defined(CONFIGURE_SCHEDULER_NAME)
     989    /** Configure the name of the scheduler instance */
     990    #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'E', 'D', 'F')
     991  #endif
     992
     993  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     994    /** Configure the context needed by the scheduler instance */
     995    #define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_EDF_SMP(dflt)
     996
     997    /** Configure the controls for this scheduler instance */
     998    #define CONFIGURE_SCHEDULER_CONTROLS \
     999      RTEMS_SCHEDULER_CONTROL_EDF_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
    9791000  #endif
    9801001#endif
     
    31513172    #ifdef CONFIGURE_SCHEDULER_EDF
    31523173      Scheduler_EDF_Node EDF;
     3174    #endif
     3175    #ifdef CONFIGURE_SCHEDULER_EDF_SMP
     3176      Scheduler_EDF_SMP_Node EDF_SMP;
    31533177    #endif
    31543178    #ifdef CONFIGURE_SCHEDULER_PRIORITY
  • cpukit/sapi/include/rtems/scheduler.h

    r15dbc71 rf3d9f228  
    66
    77/*
    8  * Copyright (c) 2014, 2016 embedded brains GmbH.  All rights reserved.
     8 * Copyright (c) 2014, 2017 embedded brains GmbH.  All rights reserved.
    99 *
    1010 *  embedded brains GmbH
     
    9494#endif
    9595
     96#ifdef CONFIGURE_SCHEDULER_EDF_SMP
     97  #include <rtems/score/scheduleredfsmp.h>
     98
     99  #define RTEMS_SCHEDULER_CONTEXT_EDF_SMP_NAME( name ) \
     100    RTEMS_SCHEDULER_CONTEXT_NAME( EDF_SMP_ ## name )
     101
     102  #define RTEMS_SCHEDULER_CONTEXT_EDF_SMP( name ) \
     103    static Scheduler_EDF_SMP_Context RTEMS_SCHEDULER_CONTEXT_EDF_SMP_NAME( name )
     104
     105  #define RTEMS_SCHEDULER_CONTROL_EDF_SMP( name, obj_name ) \
     106    { \
     107      &RTEMS_SCHEDULER_CONTEXT_EDF_SMP_NAME( name ).Base.Base, \
     108      SCHEDULER_EDF_SMP_ENTRY_POINTS, \
     109      SCHEDULER_EDF_MAXIMUM_PRIORITY, \
     110      ( obj_name ) \
     111    }
     112#endif
     113
    96114#ifdef CONFIGURE_SCHEDULER_PRIORITY
    97115  #include <rtems/score/schedulerpriority.h>
Note: See TracChangeset for help on using the changeset viewer.