summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-09 10:33:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2014-04-15 08:37:12 +0200
commit133d54c55e95874e173a242cc9c56521f8dd495a (patch)
treec6df1499021bf1869016e5191cb8c2bdc4e12ab7
parent0712d172d0bce40f3a9190af511249256ddac5f1 (diff)
downloadrtems-133d54c55e95874e173a242cc9c56521f8dd495a.tar.bz2
score: Add scheduler name
-rw-r--r--cpukit/sapi/include/confdefs.h52
-rw-r--r--cpukit/sapi/include/rtems/scheduler.h35
-rw-r--r--cpukit/score/include/rtems/score/scheduler.h5
-rw-r--r--doc/user/conf.t37
4 files changed, 107 insertions, 22 deletions
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index e62e9175cd..5ec0cf2516 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -666,6 +666,10 @@ const rtems_libio_helper rtems_fs_init_helper =
* If the Priority Scheduler is selected, then configure for it.
*/
#if defined(CONFIGURE_SCHEDULER_PRIORITY)
+ #if !defined(CONFIGURE_SCHEDULER_NAME)
+ #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'D', ' ')
+ #endif
+
#if !defined(CONFIGURE_SCHEDULER_CONTROLS)
#define CONFIGURE_SCHEDULER_CONTEXT \
RTEMS_SCHEDULER_CONTEXT_PRIORITY( \
@@ -674,7 +678,7 @@ const rtems_libio_helper rtems_fs_init_helper =
)
#define CONFIGURE_SCHEDULER_CONTROLS \
- RTEMS_SCHEDULER_CONTROL_PRIORITY(dflt)
+ RTEMS_SCHEDULER_CONTROL_PRIORITY(dflt, CONFIGURE_SCHEDULER_NAME)
#endif
#endif
@@ -683,6 +687,10 @@ const rtems_libio_helper rtems_fs_init_helper =
* it.
*/
#if defined(CONFIGURE_SCHEDULER_PRIORITY_SMP)
+ #if !defined(CONFIGURE_SCHEDULER_NAME)
+ #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'D', ' ')
+ #endif
+
#if !defined(CONFIGURE_SCHEDULER_CONTROLS)
#define CONFIGURE_SCHEDULER_CONTEXT \
RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP( \
@@ -691,7 +699,7 @@ const rtems_libio_helper rtems_fs_init_helper =
)
#define CONFIGURE_SCHEDULER_CONTROLS \
- RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(dflt)
+ RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
#endif
#endif
@@ -700,6 +708,10 @@ const rtems_libio_helper rtems_fs_init_helper =
* it.
*/
#if defined(CONFIGURE_SCHEDULER_PRIORITY_AFFINITY_SMP)
+ #if !defined(CONFIGURE_SCHEDULER_NAME)
+ #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'A', ' ')
+ #endif
+
#if !defined(CONFIGURE_SCHEDULER_CONTROLS)
#define CONFIGURE_SCHEDULER_CONTEXT \
RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP( \
@@ -708,7 +720,10 @@ const rtems_libio_helper rtems_fs_init_helper =
)
#define CONFIGURE_SCHEDULER_CONTROLS \
- RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP(dflt)
+ RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( \
+ dflt, \
+ CONFIGURE_SCHEDULER_NAME \
+ )
#endif
#endif
@@ -716,10 +731,15 @@ const rtems_libio_helper rtems_fs_init_helper =
* If the Simple Priority Scheduler is selected, then configure for it.
*/
#if defined(CONFIGURE_SCHEDULER_SIMPLE)
+ #if !defined(CONFIGURE_SCHEDULER_NAME)
+ #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'P', 'S', ' ')
+ #endif
+
#if !defined(CONFIGURE_SCHEDULER_CONTROLS)
#define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_SIMPLE(dflt)
- #define CONFIGURE_SCHEDULER_CONTROLS RTEMS_SCHEDULER_CONTROL_SIMPLE(dflt)
+ #define CONFIGURE_SCHEDULER_CONTROLS \
+ RTEMS_SCHEDULER_CONTROL_SIMPLE(dflt, CONFIGURE_SCHEDULER_NAME)
#endif
#endif
@@ -727,12 +747,16 @@ const rtems_libio_helper rtems_fs_init_helper =
* If the Simple SMP Priority Scheduler is selected, then configure for it.
*/
#if defined(CONFIGURE_SCHEDULER_SIMPLE_SMP)
+ #if !defined(CONFIGURE_SCHEDULER_NAME)
+ #define CONFIGURE_SCHEDULER_NAME rtems_build_name('M', 'P', 'S', ' ')
+ #endif
+
#if !defined(CONFIGURE_SCHEDULER_CONTROLS)
#define CONFIGURE_SCHEDULER_CONTEXT \
RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP(dflt)
#define CONFIGURE_SCHEDULER_CONTROLS \
- RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(dflt)
+ RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP(dflt, CONFIGURE_SCHEDULER_NAME)
#endif
#endif
@@ -740,10 +764,15 @@ const rtems_libio_helper rtems_fs_init_helper =
* If the EDF Scheduler is selected, then configure for it.
*/
#if defined(CONFIGURE_SCHEDULER_EDF)
+ #if !defined(CONFIGURE_SCHEDULER_NAME)
+ #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'E', 'D', 'F')
+ #endif
+
#if !defined(CONFIGURE_SCHEDULER_CONTROLS)
#define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_EDF(dflt)
- #define CONFIGURE_SCHEDULER_CONTROLS RTEMS_SCHEDULER_CONTROL_EDF(dflt)
+ #define CONFIGURE_SCHEDULER_CONTROLS \
+ RTEMS_SCHEDULER_CONTROL_EDF(dflt, CONFIGURE_SCHEDULER_NAME)
#endif
#endif
@@ -751,10 +780,15 @@ const rtems_libio_helper rtems_fs_init_helper =
* If the CBS Scheduler is selected, then configure for it.
*/
#if defined(CONFIGURE_SCHEDULER_CBS)
+ #if !defined(CONFIGURE_SCHEDULER_NAME)
+ #define CONFIGURE_SCHEDULER_NAME rtems_build_name('U', 'C', 'B', 'S')
+ #endif
+
#if !defined(CONFIGURE_SCHEDULER_CONTROLS)
#define CONFIGURE_SCHEDULER_CONTEXT RTEMS_SCHEDULER_CONTEXT_CBS(dflt)
- #define CONFIGURE_SCHEDULER_CONTROLS RTEMS_SCHEDULER_CONTROL_CBS(dflt)
+ #define CONFIGURE_SCHEDULER_CONTROLS \
+ RTEMS_SCHEDULER_CONTROL_CBS(dflt, CONFIGURE_SCHEDULER_NAME)
#endif
#ifndef CONFIGURE_CBS_MAXIMUM_SERVERS
@@ -775,7 +809,9 @@ const rtems_libio_helper rtems_fs_init_helper =
* this code to know which scheduler is configured by the user.
*/
#ifdef CONFIGURE_INIT
- CONFIGURE_SCHEDULER_CONTEXT;
+ #if defined(CONFIGURE_SCHEDULER_CONTEXT)
+ CONFIGURE_SCHEDULER_CONTEXT;
+ #endif
const Scheduler_Control _Scheduler_Table[] = {
CONFIGURE_SCHEDULER_CONTROLS
diff --git a/cpukit/sapi/include/rtems/scheduler.h b/cpukit/sapi/include/rtems/scheduler.h
index 5d6b2eccd2..06824e9370 100644
--- a/cpukit/sapi/include/rtems/scheduler.h
+++ b/cpukit/sapi/include/rtems/scheduler.h
@@ -43,10 +43,11 @@
#define RTEMS_SCHEDULER_CONTEXT_CBS( name ) \
static Scheduler_EDF_Context RTEMS_SCHEDULER_CONTEXT_CBS_NAME( name )
- #define RTEMS_SCHEDULER_CONTROL_CBS( name ) \
+ #define RTEMS_SCHEDULER_CONTROL_CBS( name, obj_name ) \
{ \
&RTEMS_SCHEDULER_CONTEXT_CBS_NAME( name ).Base, \
- SCHEDULER_CBS_ENTRY_POINTS \
+ SCHEDULER_CBS_ENTRY_POINTS, \
+ ( obj_name ) \
}
#endif
@@ -59,10 +60,11 @@
#define RTEMS_SCHEDULER_CONTEXT_EDF( name ) \
static Scheduler_EDF_Context RTEMS_SCHEDULER_CONTEXT_EDF_NAME( name )
- #define RTEMS_SCHEDULER_CONTROL_EDF( name ) \
+ #define RTEMS_SCHEDULER_CONTROL_EDF( name, obj_name ) \
{ \
&RTEMS_SCHEDULER_CONTEXT_EDF_NAME( name ).Base, \
- SCHEDULER_EDF_ENTRY_POINTS \
+ SCHEDULER_EDF_ENTRY_POINTS, \
+ ( obj_name ) \
}
#endif
@@ -78,10 +80,11 @@
Chain_Control Ready[ ( prio_count ) ]; \
} RTEMS_SCHEDULER_CONTEXT_PRIORITY_NAME( name )
- #define RTEMS_SCHEDULER_CONTROL_PRIORITY( name ) \
+ #define RTEMS_SCHEDULER_CONTROL_PRIORITY( name, obj_name ) \
{ \
&RTEMS_SCHEDULER_CONTEXT_PRIORITY_NAME( name ).Base.Base, \
- SCHEDULER_PRIORITY_ENTRY_POINTS \
+ SCHEDULER_PRIORITY_ENTRY_POINTS, \
+ ( obj_name ) \
}
#endif
@@ -97,10 +100,11 @@
Chain_Control Ready[ ( prio_count ) ]; \
} RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP_NAME( name )
- #define RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( name ) \
+ #define RTEMS_SCHEDULER_CONTROL_PRIORITY_AFFINITY_SMP( name, obj_name ) \
{ \
&RTEMS_SCHEDULER_CONTEXT_PRIORITY_AFFINITY_SMP_NAME( name ).Base.Base, \
- SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS \
+ SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS, \
+ ( obj_name ) \
}
#endif
@@ -116,10 +120,11 @@
Chain_Control Ready[ ( prio_count ) ]; \
} RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP_NAME( name )
- #define RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( name ) \
+ #define RTEMS_SCHEDULER_CONTROL_PRIORITY_SMP( name, obj_name ) \
{ \
&RTEMS_SCHEDULER_CONTEXT_PRIORITY_SMP_NAME( name ).Base.Base, \
- SCHEDULER_PRIORITY_SMP_ENTRY_POINTS \
+ SCHEDULER_PRIORITY_SMP_ENTRY_POINTS, \
+ ( obj_name ) \
}
#endif
@@ -133,10 +138,11 @@
static Scheduler_simple_Context \
RTEMS_SCHEDULER_CONTEXT_SIMPLE_NAME( name )
- #define RTEMS_SCHEDULER_CONTROL_SIMPLE( name ) \
+ #define RTEMS_SCHEDULER_CONTROL_SIMPLE( name, obj_name ) \
{ \
&RTEMS_SCHEDULER_CONTEXT_SIMPLE_NAME( name ).Base, \
- SCHEDULER_SIMPLE_ENTRY_POINTS \
+ SCHEDULER_SIMPLE_ENTRY_POINTS, \
+ ( obj_name ) \
}
#endif
@@ -150,10 +156,11 @@
static Scheduler_simple_SMP_Context \
RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP_NAME( name )
- #define RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP( name ) \
+ #define RTEMS_SCHEDULER_CONTROL_SIMPLE_SMP( name, obj_name ) \
{ \
&RTEMS_SCHEDULER_CONTEXT_SIMPLE_SMP_NAME( name ).Base, \
- SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
+ SCHEDULER_SIMPLE_SMP_ENTRY_POINTS, \
+ ( obj_name ) \
}
#endif
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index d4e1339afb..3fd47c78a2 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -165,6 +165,11 @@ struct Scheduler_Control {
* @brief The scheduler operations.
*/
Scheduler_Operations Operations;
+
+ /**
+ * @brief The scheduler name.
+ */
+ uint32_t name;
};
/**
diff --git a/doc/user/conf.t b/doc/user/conf.t
index afecef1c65..9b093f8f8e 100644
--- a/doc/user/conf.t
+++ b/doc/user/conf.t
@@ -3705,6 +3705,43 @@ This scheduler is only available when RTEMS is configured with SMP
support enabled.
@c
+@c === Configuring a Scheduler Name ===
+@c
+@subsection Configuring a Scheduler Name
+
+@findex CONFIGURE_SCHEDULER_NAME
+
+@table @b
+@item CONSTANT:
+@code{CONFIGURE_SCHEDULER_NAME}
+
+@item DATA TYPE:
+RTEMS Name (@code{rtems_name}).
+
+@item RANGE:
+Any value.
+
+@item DEFAULT VALUE:
+The default name is
+@itemize @bullet
+@item @code{"UCBS"} for the Uni-Processor CBS scheduler,
+@item @code{"UEDF"} for the Uni-Processor EDF scheduler,
+@item @code{"UPD "} for the Uni-Processor Deterministic Priority scheduler,
+@item @code{"UPS "} for the Uni-Processor Simple Priority scheduler,
+@item @code{"MPA "} for the Multi-Processor Priority Affinity scheduler, and
+@item @code{"MPD "} for the Multi-Processor Deterministic Priority scheduler, and
+@item @code{"MPS "} for the Multi-Processor Simple Priority scheduler.
+@end itemize
+
+@end table
+
+@subheading DESCRIPTION:
+Schedulers can be identified via @code{rtems_scheduler_ident}. The name of the scheduler is determined by the configuration.
+
+@subheading NOTES:
+None.
+
+@c
@c === Configuring a User Scheduler ===
@c
@subsection Configuring a User Provided Scheduler