diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-05-17 19:48:44 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-05-17 19:48:44 +0000 |
commit | ba7bc099a86deef7c5b0f00887a315262e8f7974 (patch) | |
tree | 83a4a6c0db1840dda210a0c9e92732c38acff76b /cpukit/sapi | |
parent | 2011-05-17 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-ba7bc099a86deef7c5b0f00887a315262e8f7974.tar.bz2 |
2011-05-17 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1789/cpukit
* sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add
Simple SMP Priority Scheduler.
* score/include/rtems/score/schedulersimplesmp.h,
score/src/schedulersimplesmpblock.c,
score/src/schedulersimplesmpschedule.c,
score/src/schedulersimplesmpunblock.c: New files.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r-- | cpukit/sapi/include/confdefs.h | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h index e10b615e8b..a3d3b21507 100644 --- a/cpukit/sapi/include/confdefs.h +++ b/cpukit/sapi/include/confdefs.h @@ -569,9 +569,10 @@ rtems_fs_init_functions_t rtems_fs_init_helper = * * The scheduler configuration allows an application to select the * scheduling policy to use. The supported configurations are: - * CONFIGURE_SCHEDULER_USER - user provided scheduler - * CONFIGURE_SCHEDULER_PRIORITY - Deterministic Priority Scheduler - * CONFIGURE_SCHEDULER_SIMPLE - Light-weight Priority Scheduler + * CONFIGURE_SCHEDULER_USER - user provided scheduler + * CONFIGURE_SCHEDULER_PRIORITY - Deterministic Priority Scheduler + * CONFIGURE_SCHEDULER_SIMPLE - Light-weight Priority Scheduler + * CONFIGURE_SCHEDULER_SIMPLE_SMP - Simple SMP Priority Scheduler * * If no configuration is specified by the application, then * CONFIGURE_SCHEDULER_PRIORITY is assumed to be the default. @@ -589,11 +590,20 @@ rtems_fs_init_functions_t rtems_fs_init_helper = #error "CONFIGURE_ERROR: CONFIGURE_SCHEDULER_USER requires CONFIGURE_SCHEDULER_USER_ENTRY_POINTS" #endif +#if !defined(RTEMS_SMP) + #undef CONFIGURE_SCHEDULER_SIMPLE_SMP +#endif + /* If no scheduler is specified, the priority scheduler is default. */ #if !defined(CONFIGURE_SCHEDULER_USER) && \ !defined(CONFIGURE_SCHEDULER_PRIORITY) && \ - !defined(CONFIGURE_SCHEDULER_SIMPLE) - #define CONFIGURE_SCHEDULER_PRIORITY + !defined(CONFIGURE_SCHEDULER_SIMPLE) && \ + !defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) + #if defined(RTEMS_SMP) && defined(CONFIGURE_SMP_APPLICATION) + #define CONFIGURE_SCHEDULER_SIMPLE_SMP + #else + #define CONFIGURE_SCHEDULER_PRIORITY + #endif #endif /* @@ -630,6 +640,24 @@ rtems_fs_init_functions_t rtems_fs_init_helper = #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (0) #endif +/* + * If the Simple SMP Priority Scheduler is selected, then configure for it. + */ +#if defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) + #include <rtems/score/schedulersimplesmp.h> + #define CONFIGURE_SCHEDULER_ENTRY_POINTS SCHEDULER_SIMPLE_SMP_ENTRY_POINTS + + /** + * Define the memory used by the Simple SMP Scheduler + * + * NOTE: This is the same as the Simple Scheduler + */ + #define CONFIGURE_MEMORY_FOR_SCHEDULER ( \ + _Configure_From_workspace( sizeof(Chain_Control) ) \ + ) + #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER (0) +#endif + #if defined(CONFIGURE_SCHEDULER_USER) #define CONFIGURE_SCHEDULER_ENTRY_POINTS \ CONFIGURE_SCHEDULER_USER_ENTRY_POINTS |