summaryrefslogtreecommitdiffstats
path: root/cpukit/sapi/include/confdefs.h
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-09-15 15:49:32 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-09-15 15:49:32 +0000
commit82db8e5675c79ddbdf6382308b0ff034e6f02103 (patch)
tree2aef1a6f350019f5a73501beaf6b875b69706099 /cpukit/sapi/include/confdefs.h
parent2011-09-15 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff)
downloadrtems-82db8e5675c79ddbdf6382308b0ff034e6f02103.tar.bz2
2011-09-15 Petr Benes <benesp16@fel.cvut.cz>
PR 1906/cpukit * sapi/Makefile.am, sapi/preinstall.am, sapi/include/confdefs.h, score/Makefile.am, score/preinstall.am: Add the CBS (Constant Bandwidth Server) scheduler. This is a complex scheduling policy built atop of the EDF scheduler. Unlike other schedulers, this one provides a user API and handles not only deadlines of tasks but also claimed budget per period. The main aim of the scheduler is isolation of tasks so that each task is guaranteed to meet all deadlines regardless of how other tasks behave. * sapi/include/rtems/cbs.h, sapi/inline/rtems/cbs.inl, score/include/rtems/score/schedulercbs.h, score/src/schedulercbs.c, score/src/schedulercbsattachthread.c, score/src/schedulercbscleanup.c, score/src/schedulercbscreateserver.c, score/src/schedulercbsdestroyserver.c, score/src/schedulercbsdetachthread.c, score/src/schedulercbsgetapprovedbudget.c, score/src/schedulercbsgetexecutiontime.c, score/src/schedulercbsgetparameters.c, score/src/schedulercbsgetremainingbudget.c, score/src/schedulercbsgetserverid.c, score/src/schedulercbsreleasejob.c, score/src/schedulercbssetparameters.c, score/src/schedulercbsunblock.c: New files.
Diffstat (limited to 'cpukit/sapi/include/confdefs.h')
-rw-r--r--cpukit/sapi/include/confdefs.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index 2a9d75ac2c..a82dd00a87 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -574,6 +574,7 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
* CONFIGURE_SCHEDULER_SIMPLE - Light-weight Priority Scheduler
* CONFIGURE_SCHEDULER_SIMPLE_SMP - Simple SMP Priority Scheduler
* CONFIGURE_SCHEDULER_EDF - EDF Scheduler
+ * CONFIGURE_SCHEDULER_CBS - CBS Scheduler
*
* If no configuration is specified by the application, then
* CONFIGURE_SCHEDULER_PRIORITY is assumed to be the default.
@@ -600,7 +601,8 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
!defined(CONFIGURE_SCHEDULER_PRIORITY) && \
!defined(CONFIGURE_SCHEDULER_SIMPLE) && \
!defined(CONFIGURE_SCHEDULER_SIMPLE_SMP) && \
- !defined(CONFIGURE_SCHEDULER_EDF)
+ !defined(CONFIGURE_SCHEDULER_EDF) && \
+ !defined(CONFIGURE_SCHEDULER_CBS)
#if defined(RTEMS_SMP) && defined(CONFIGURE_SMP_APPLICATION)
#define CONFIGURE_SCHEDULER_SIMPLE_SMP
#else
@@ -676,6 +678,31 @@ rtems_fs_init_functions_t rtems_fs_init_helper =
_Configure_From_workspace(sizeof(Scheduler_EDF_Per_thread)))
#endif
+/*
+ * If the CBS Scheduler is selected, then configure for it.
+ */
+#if defined(CONFIGURE_SCHEDULER_CBS)
+ #include <rtems/score/schedulercbs.h>
+ #define CONFIGURE_SCHEDULER_ENTRY_POINTS SCHEDULER_CBS_ENTRY_POINTS
+
+ #ifndef CONFIGURE_CBS_MAXIMUM_SERVERS
+ #define CONFIGURE_CBS_MAXIMUM_SERVERS CONFIGURE_MAXIMUM_TASKS
+ #endif
+
+ #ifdef CONFIGURE_INIT
+ uint32_t _Scheduler_CBS_Maximum_servers = CONFIGURE_CBS_MAXIMUM_SERVERS;
+ #endif
+
+ /**
+ * define the memory used by the CBS scheduler
+ */
+ #define CONFIGURE_MEMORY_FOR_SCHEDULER ( \
+ _Configure_From_workspace((sizeof(Scheduler_CBS_Server) + \
+ sizeof(Scheduler_CBS_Server*)) * CONFIGURE_CBS_MAXIMUM_SERVERS))
+ #define CONFIGURE_MEMORY_PER_TASK_FOR_SCHEDULER ( \
+ _Configure_From_workspace(sizeof(Scheduler_CBS_Per_thread)))
+#endif
+
#if defined(CONFIGURE_SCHEDULER_USER)
#define CONFIGURE_SCHEDULER_ENTRY_POINTS \
CONFIGURE_SCHEDULER_USER_ENTRY_POINTS