Changeset 981eed2 in rtems


Ignore:
Timestamp:
Apr 29, 2016, 10:09:32 AM (4 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
b1b8bd2
Parents:
66374df
git-author:
Sebastian Huber <sebastian.huber@…> (04/29/16 10:09:32)
git-committer:
Sebastian Huber <sebastian.huber@…> (05/02/16 05:46:17)
Message:

score: Add dummy Strong APA scheduler

Start with a copy of the Priority SMP scheduler implementation.

Update #2510.

Files:
6 added
6 edited

Legend:

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

    r66374df r981eed2  
    772772 *  - CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP - Deterministic
    773773 *    Priority SMP Affinity Scheduler
     774 *  - CONFIGURE_SCHEDULER_STRONG_APA - Strong APA Scheduler
    774775 *  - CONFIGURE_SCHEDULER_SIMPLE - Light-weight Priority Scheduler
    775776 *  - CONFIGURE_SCHEDULER_SIMPLE_SMP - Simple SMP Priority Scheduler
     
    796797    !defined(CONFIGURE_SCHEDULER_PRIORITY_SMP) && \
    797798    !defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP) && \
     799    !defined(CONFIGURE_SCHEDULER_STRONG_APA) && \
    798800    !defined(CONFIGURE_SCHEDULER_SIMPLE) && \
    799801    !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) && \
     
    887889        CONFIGURE_SCHEDULER_NAME \
    888890      )
     891  #endif
     892#endif
     893
     894/*
     895 * If the Strong APA Scheduler is selected, then configure for
     896 * it.
     897 */
     898#if defined(CONFIGURE_SCHEDULER_STRONG_APA)
     899  #if !defined(CONFIGURE_SCHEDULER_NAME)
     900    /** Configure the name of the scheduler instance */
     901    #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'A', 'P', 'A')
     902  #endif
     903
     904  #if !defined(CONFIGURE_SCHEDULER_CONTROLS)
     905    /** Configure the context needed by the scheduler instance */
     906    #define CONFIGURE_SCHEDULER_CONTEXT \
     907      RTEMS_SCHEDULER_CONTEXT_STRONG_APA( \
     908        dflt, \
     909        CONFIGURE_MAXIMUM_PRIORITY + 1 \
     910      )
     911
     912    /** Configure the controls for this scheduler instance */
     913    #define CONFIGURE_SCHEDULER_CONTROLS \
     914      RTEMS_SCHEDULER_CONTROL_STRONG_APA(dflt, CONFIGURE_SCHEDULER_NAME)
    889915  #endif
    890916#endif
     
    32643290      #ifdef CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP
    32653291        Scheduler_priority_affinity_SMP_Node Priority_affinity_SMP;
     3292      #endif
     3293      #ifdef CONFIGURE_SCHEDULER_STRONG_APA
     3294        Scheduler_strong_APA_Node Strong_APA;
    32663295      #endif
    32673296      #ifdef CONFIGURE_SCHEDULER_USER_PER_THREAD
  • cpukit/sapi/include/rtems/scheduler.h

    r66374df r981eed2  
    152152#endif
    153153
     154#ifdef CONFIGURE_SCHEDULER_STRONG_APA
     155  #include <rtems/score/schedulerstrongapa.h>
     156
     157  #define RTEMS_SCHEDULER_CONTEXT_STRONG_APA_NAME( name ) \
     158    RTEMS_SCHEDULER_CONTEXT_NAME( strong_APA_ ## name )
     159
     160  #define RTEMS_SCHEDULER_CONTEXT_STRONG_APA( name, prio_count ) \
     161    static struct { \
     162      Scheduler_strong_APA_Context Base; \
     163      Chain_Control                Ready[ ( prio_count ) ]; \
     164    } RTEMS_SCHEDULER_CONTEXT_STRONG_APA_NAME( name )
     165
     166  #define RTEMS_SCHEDULER_CONTROL_STRONG_APA( name, obj_name ) \
     167    { \
     168      &RTEMS_SCHEDULER_CONTEXT_STRONG_APA_NAME( name ).Base.Base.Base, \
     169      SCHEDULER_STRONG_APA_ENTRY_POINTS, \
     170      ( obj_name ) \
     171    }
     172#endif
     173
    154174#ifdef CONFIGURE_SCHEDULER_SIMPLE
    155175  #include <rtems/score/schedulersimple.h>
  • cpukit/score/Makefile.am

    r66374df r981eed2  
    129129include_rtems_score_HEADERS += include/rtems/score/schedulerpriorityaffinitysmp.h
    130130include_rtems_score_HEADERS += include/rtems/score/schedulersimplesmp.h
     131include_rtems_score_HEADERS += include/rtems/score/schedulerstrongapa.h
    131132endif
    132133
     
    149150libscore_a_SOURCES += src/schedulerprioritysmp.c
    150151libscore_a_SOURCES += src/schedulersimplesmp.c
     152libscore_a_SOURCES += src/schedulerstrongapa.c
    151153libscore_a_SOURCES += src/schedulersmpdebug.c
    152154libscore_a_SOURCES += src/smp.c
  • cpukit/score/preinstall.am

    r66374df r981eed2  
    447447        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersimplesmp.h
    448448PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimplesmp.h
     449
     450$(PROJECT_INCLUDE)/rtems/score/schedulerstrongapa.h: include/rtems/score/schedulerstrongapa.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
     451        $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulerstrongapa.h
     452PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulerstrongapa.h
    449453endif
  • testsuites/smptests/Makefile.am

    r66374df r981eed2  
    3939SUBDIRS += smpschedsem01
    4040SUBDIRS += smpsignal01
     41SUBDIRS += smpstrongapa01
    4142SUBDIRS += smpswitchextension01
    4243SUBDIRS += smpthreadlife01
  • testsuites/smptests/configure.ac

    r66374df r981eed2  
    5858# Explicitly list all Makefiles here
    5959AC_CONFIG_FILES([Makefile
     60smpstrongapa01/Makefile
    6061smp01/Makefile
    6162smp02/Makefile
Note: See TracChangeset for help on using the changeset viewer.