[rtems commit] score: Add and use _Scheduler_default_Schedule()
Sebastian Huber
sebh at rtems.org
Thu May 15 11:10:48 UTC 2014
Module: rtems
Branch: master
Commit: 3733b224100d59ace0518834917b8e3f76e8a68a
Changeset: http://git.rtems.org/rtems/commit/?id=3733b224100d59ace0518834917b8e3f76e8a68a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu May 15 08:46:56 2014 +0200
score: Add and use _Scheduler_default_Schedule()
---
cpukit/score/Makefile.am | 1 +
cpukit/score/include/rtems/score/scheduler.h | 13 ++++++++++-
.../rtems/score/schedulerpriorityaffinitysmp.h | 2 +-
.../include/rtems/score/schedulerprioritysmp.h | 7 +-----
.../score/include/rtems/score/schedulersimplesmp.h | 7 +-----
cpukit/score/src/schedulerdefaultschedule.c | 22 ++++++++++++++++++++
cpukit/score/src/schedulerprioritysmp.c | 9 --------
cpukit/score/src/schedulersimplesmp.c | 9 --------
8 files changed, 38 insertions(+), 32 deletions(-)
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index ed68ee0..7968f02 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -201,6 +201,7 @@ libscore_a_SOURCES += src/schedulergetaffinity.c
libscore_a_SOURCES += src/schedulersetaffinity.c
libscore_a_SOURCES += src/schedulerdefaultallocatefree.c
libscore_a_SOURCES += src/schedulerdefaultreleasejob.c
+libscore_a_SOURCES += src/schedulerdefaultschedule.c
libscore_a_SOURCES += src/schedulerdefaultstartidle.c
libscore_a_SOURCES += src/schedulerdefaulttick.c
libscore_a_SOURCES += src/schedulerdefaultupdate.c
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index b1e8f8a..c4bd350 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -240,7 +240,18 @@ extern const Scheduler_Control _Scheduler_Table[];
#endif
/**
- * @brief Returns an arbitrary non-NULL value.
+ * @brief Does nothing.
+ *
+ * @param[in] scheduler Unused.
+ * @param[in] the_thread Unused.
+ */
+void _Scheduler_default_Schedule(
+ const Scheduler_Control *scheduler,
+ Thread_Control *the_thread
+);
+
+/**
+ * @brief Returns true.
*
* @param[in] scheduler Unused.
* @param[in] the_thread Unused.
diff --git a/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h b/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h
index c21d066..6b66504 100644
--- a/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h
+++ b/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h
@@ -50,7 +50,7 @@ extern "C" {
#define SCHEDULER_PRIORITY_AFFINITY_SMP_ENTRY_POINTS \
{ \
_Scheduler_priority_SMP_Initialize, \
- _Scheduler_priority_SMP_Schedule, \
+ _Scheduler_default_Schedule, \
_Scheduler_priority_SMP_Yield, \
_Scheduler_priority_SMP_Block, \
_Scheduler_priority_SMP_Unblock, \
diff --git a/cpukit/score/include/rtems/score/schedulerprioritysmp.h b/cpukit/score/include/rtems/score/schedulerprioritysmp.h
index a22b323..267a488 100644
--- a/cpukit/score/include/rtems/score/schedulerprioritysmp.h
+++ b/cpukit/score/include/rtems/score/schedulerprioritysmp.h
@@ -79,7 +79,7 @@ typedef struct {
#define SCHEDULER_PRIORITY_SMP_ENTRY_POINTS \
{ \
_Scheduler_priority_SMP_Initialize, \
- _Scheduler_priority_SMP_Schedule, \
+ _Scheduler_default_Schedule, \
_Scheduler_priority_SMP_Yield, \
_Scheduler_priority_SMP_Block, \
_Scheduler_priority_SMP_Unblock, \
@@ -102,11 +102,6 @@ bool _Scheduler_priority_SMP_Allocate(
Thread_Control *thread
);
-void _Scheduler_priority_SMP_Schedule(
- const Scheduler_Control *scheduler,
- Thread_Control *thread
-);
-
void _Scheduler_priority_SMP_Block(
const Scheduler_Control *scheduler,
Thread_Control *thread
diff --git a/cpukit/score/include/rtems/score/schedulersimplesmp.h b/cpukit/score/include/rtems/score/schedulersimplesmp.h
index 32e998d..70f0336 100644
--- a/cpukit/score/include/rtems/score/schedulersimplesmp.h
+++ b/cpukit/score/include/rtems/score/schedulersimplesmp.h
@@ -60,7 +60,7 @@ typedef struct {
#define SCHEDULER_SIMPLE_SMP_ENTRY_POINTS \
{ \
_Scheduler_simple_SMP_Initialize, \
- _Scheduler_simple_SMP_Schedule, \
+ _Scheduler_default_Schedule, \
_Scheduler_simple_SMP_Yield, \
_Scheduler_simple_SMP_Block, \
_Scheduler_simple_SMP_Unblock, \
@@ -105,11 +105,6 @@ void _Scheduler_simple_SMP_Yield(
Thread_Control *thread
);
-void _Scheduler_simple_SMP_Schedule(
- const Scheduler_Control *scheduler,
- Thread_Control *thread
-);
-
void _Scheduler_simple_SMP_Start_idle(
const Scheduler_Control *scheduler,
Thread_Control *thread,
diff --git a/cpukit/score/src/schedulerdefaultschedule.c b/cpukit/score/src/schedulerdefaultschedule.c
new file mode 100644
index 0000000..ca8d01e
--- /dev/null
+++ b/cpukit/score/src/schedulerdefaultschedule.c
@@ -0,0 +1,22 @@
+/*
+ * Copyright (c) 2014 embedded brains GmbH
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+ #include "config.h"
+#endif
+
+#include <rtems/score/scheduler.h>
+
+void _Scheduler_default_Schedule(
+ const Scheduler_Control *scheduler,
+ Thread_Control *the_thread
+)
+{
+ (void) scheduler;
+ (void) the_thread;
+}
diff --git a/cpukit/score/src/schedulerprioritysmp.c b/cpukit/score/src/schedulerprioritysmp.c
index dbf7b0c..0c02b44 100644
--- a/cpukit/score/src/schedulerprioritysmp.c
+++ b/cpukit/score/src/schedulerprioritysmp.c
@@ -326,15 +326,6 @@ void _Scheduler_priority_SMP_Yield(
_ISR_Enable( level );
}
-void _Scheduler_priority_SMP_Schedule(
- const Scheduler_Control *scheduler,
- Thread_Control *thread
-)
-{
- (void) scheduler;
- (void) thread;
-}
-
void _Scheduler_priority_SMP_Start_idle(
const Scheduler_Control *scheduler,
Thread_Control *thread,
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c
index a971ee1..88f301a 100644
--- a/cpukit/score/src/schedulersimplesmp.c
+++ b/cpukit/score/src/schedulersimplesmp.c
@@ -262,15 +262,6 @@ void _Scheduler_simple_SMP_Yield(
_ISR_Enable( level );
}
-void _Scheduler_simple_SMP_Schedule(
- const Scheduler_Control *scheduler,
- Thread_Control *thread
-)
-{
- (void) scheduler;
- (void) thread;
-}
-
void _Scheduler_simple_SMP_Start_idle(
const Scheduler_Control *scheduler,
Thread_Control *thread,
More information about the vc
mailing list