[rtems commit] score: Move SCHEDULER_EDF_PRIO_MSB

Sebastian Huber sebh at rtems.org
Fri Jun 24 09:53:15 UTC 2016


Module:    rtems
Branch:    master
Commit:    50a56dff1394606a7762575cca916d1a8629aea3
Changeset: http://git.rtems.org/rtems/commit/?id=50a56dff1394606a7762575cca916d1a8629aea3

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Fri Jun 24 11:16:35 2016 +0200

score: Move SCHEDULER_EDF_PRIO_MSB

This is an implementation detail of the EDF scheduler.

---

 cpukit/score/include/rtems/score/scheduleredf.h     | 9 ---------
 cpukit/score/include/rtems/score/scheduleredfimpl.h | 9 +++++++++
 cpukit/score/src/schedulercbscreateserver.c         | 1 +
 cpukit/score/src/schedulercbssetparameters.c        | 4 +---
 testsuites/sptests/spcbssched02/init.c              | 2 ++
 testsuites/sptests/spqreslib/init.c                 | 2 ++
 6 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/cpukit/score/include/rtems/score/scheduleredf.h b/cpukit/score/include/rtems/score/scheduleredf.h
index e1dce6f..c236bd5 100644
--- a/cpukit/score/include/rtems/score/scheduleredf.h
+++ b/cpukit/score/include/rtems/score/scheduleredf.h
@@ -59,15 +59,6 @@ extern "C" {
     SCHEDULER_OPERATION_DEFAULT_GET_SET_AFFINITY \
   }
 
-/**
- * This is just a most significant bit of Priority_Control type. It
- * distinguishes threads which are deadline driven (priority
- * represented by a lower number than @a SCHEDULER_EDF_PRIO_MSB) from those
- * ones who do not have any deadlines and thus are considered background
- * tasks.
- */
-#define SCHEDULER_EDF_PRIO_MSB 0x80000000
-
 typedef struct {
   /**
    * @brief Basic scheduler context.
diff --git a/cpukit/score/include/rtems/score/scheduleredfimpl.h b/cpukit/score/include/rtems/score/scheduleredfimpl.h
index 7ff7aa2..20a5f5c 100644
--- a/cpukit/score/include/rtems/score/scheduleredfimpl.h
+++ b/cpukit/score/include/rtems/score/scheduleredfimpl.h
@@ -31,6 +31,15 @@ extern "C" {
  * @{
  */
 
+/**
+ * This is just a most significant bit of Priority_Control type. It
+ * distinguishes threads which are deadline driven (priority
+ * represented by a lower number than @a SCHEDULER_EDF_PRIO_MSB) from those
+ * ones who do not have any deadlines and thus are considered background
+ * tasks.
+ */
+#define SCHEDULER_EDF_PRIO_MSB 0x80000000
+
 RTEMS_INLINE_ROUTINE Scheduler_EDF_Context *
   _Scheduler_EDF_Get_context( const Scheduler_Control *scheduler )
 {
diff --git a/cpukit/score/src/schedulercbscreateserver.c b/cpukit/score/src/schedulercbscreateserver.c
index 486329c..9d1cc0b 100644
--- a/cpukit/score/src/schedulercbscreateserver.c
+++ b/cpukit/score/src/schedulercbscreateserver.c
@@ -19,6 +19,7 @@
 #endif
 
 #include <rtems/score/schedulercbs.h>
+#include <rtems/score/scheduleredfimpl.h>
 
 int _Scheduler_CBS_Create_server (
   Scheduler_CBS_Parameters     *params,
diff --git a/cpukit/score/src/schedulercbssetparameters.c b/cpukit/score/src/schedulercbssetparameters.c
index 6ddaf3d..04682a0 100644
--- a/cpukit/score/src/schedulercbssetparameters.c
+++ b/cpukit/score/src/schedulercbssetparameters.c
@@ -19,10 +19,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
 #include <rtems/score/schedulercbs.h>
+#include <rtems/score/scheduleredfimpl.h>
 
 int _Scheduler_CBS_Set_parameters (
   Scheduler_CBS_Server_id   server_id,
diff --git a/testsuites/sptests/spcbssched02/init.c b/testsuites/sptests/spcbssched02/init.c
index 08b465b..0bae0e9 100644
--- a/testsuites/sptests/spcbssched02/init.c
+++ b/testsuites/sptests/spcbssched02/init.c
@@ -23,6 +23,8 @@
 #define CONFIGURE_INIT
 #include "system.h"
 
+#include <rtems/score/scheduleredfimpl.h>
+
 const char rtems_test_name[] = "SPCBSSCHED 2";
 
 rtems_task Init(
diff --git a/testsuites/sptests/spqreslib/init.c b/testsuites/sptests/spqreslib/init.c
index 680f7be..38d9999 100644
--- a/testsuites/sptests/spqreslib/init.c
+++ b/testsuites/sptests/spqreslib/init.c
@@ -19,6 +19,8 @@
 #define CONFIGURE_INIT
 #include "system.h"
 
+#include <rtems/score/scheduleredfimpl.h>
+
 const char rtems_test_name[] = "SPQRESLIB";
 
 rtems_id   Task_id;




More information about the vc mailing list