summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-07 11:50:32 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-08 14:11:22 +0200
commit62d947d368e078dba583dfae8b26ae43f960a625 (patch)
tree2e215a1c4f20f6eece2e730f7e1050bf763dbf75
parentscore: Rename _Scheduler_priority_Release_job() (diff)
downloadrtems-62d947d368e078dba583dfae8b26ae43f960a625.tar.bz2
score: Rename _Scheduler_simple_Allocate(), etc.
Rename _Scheduler_simple_Allocate() in _Scheduler_default_Allocate(). Rename _Scheduler_simple_Free() in _Scheduler_default_Free().
-rw-r--r--cpukit/score/Makefile.am1
-rw-r--r--cpukit/score/include/rtems/score/scheduler.h20
-rw-r--r--cpukit/score/include/rtems/score/schedulersimple.h33
-rw-r--r--cpukit/score/include/rtems/score/schedulersimplesmp.h4
-rw-r--r--cpukit/score/src/schedulerdefaultallocatefree.c38
-rw-r--r--cpukit/score/src/schedulersimple.c13
6 files changed, 63 insertions, 46 deletions
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 609772c32c..d27ce3ab76 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -179,6 +179,7 @@ libscore_a_SOURCES += src/objectallocate.c src/objectclose.c \
## SCHEDULER_C_FILES
libscore_a_SOURCES += src/scheduler.c
+libscore_a_SOURCES += src/schedulerdefaultallocatefree.c
libscore_a_SOURCES += src/schedulerdefaultreleasejob.c
libscore_a_SOURCES += src/schedulerdefaulttick.c
libscore_a_SOURCES += src/schedulerdefaultstartidle.c
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h
index 1b2ac8fff8..deefd9de01 100644
--- a/cpukit/score/include/rtems/score/scheduler.h
+++ b/cpukit/score/include/rtems/score/scheduler.h
@@ -126,6 +126,26 @@ typedef struct {
extern Scheduler_Control _Scheduler;
/**
+ * @brief Returns an arbitrary non-NULL value.
+ *
+ * @param[in] thread Unused.
+ *
+ * @return An arbitrary non-NULL value.
+ */
+void *_Scheduler_default_Allocate(
+ Thread_Control *thread
+);
+
+/**
+ * @brief Does nothing.
+ *
+ * @param[in] thread Unused.
+ */
+void _Scheduler_default_Free(
+ Thread_Control *thread
+);
+
+/**
* @brief Does nothing.
*
* @param[in] thread Unused.
diff --git a/cpukit/score/include/rtems/score/schedulersimple.h b/cpukit/score/include/rtems/score/schedulersimple.h
index b4f7345e2c..97c9e84f7f 100644
--- a/cpukit/score/include/rtems/score/schedulersimple.h
+++ b/cpukit/score/include/rtems/score/schedulersimple.h
@@ -42,8 +42,8 @@ extern "C" {
_Scheduler_simple_Yield, /* yield entry point */ \
_Scheduler_simple_Block, /* block entry point */ \
_Scheduler_simple_Unblock, /* unblock entry point */ \
- _Scheduler_simple_Allocate, /* allocate entry point */ \
- _Scheduler_simple_Free, /* free entry point */ \
+ _Scheduler_default_Allocate, /* allocate entry point */ \
+ _Scheduler_default_Free, /* free entry point */ \
_Scheduler_simple_Update, /* update entry point */ \
_Scheduler_simple_Enqueue, /* enqueue entry point */ \
_Scheduler_simple_Enqueue_first, /* enqueue_first entry point */ \
@@ -150,23 +150,6 @@ void _Scheduler_simple_Enqueue_first(
);
/**
- * @brief Return empty placeholder for the simple scheduler.
- *
- * This routine is a place holder for any memeory allocation needed
- * by the scheduler. For the simple scheduler the routine is an empty
- * place holder.
- *
- * @param[in] the_thread is the thread the scheduler is allocating
- * management memory for
- *
- * @retval this routine returns -1 since this is just an empty placeholder
- * and the return value may be defined differently by each scheduler.
- */
-void *_Scheduler_simple_Allocate(
- Thread_Control *the_thread
-);
-
-/**
* @brief Stub for simple schedule update.
*
* This routine does nothing, and is used as a stub for Schedule update
@@ -179,18 +162,6 @@ void _Scheduler_simple_Update(
);
/**
- * @brief Stub for simple schedule free.
- *
- * This routine does nothing, and is used as a stub for Schedule free
- * The overhead of a function call will still be imposed.
- *
- * @param[in] the_thread is the thread to be blocked
- */
-void _Scheduler_simple_Free(
- Thread_Control *the_thread
-);
-
-/**
* _Scheduler_simple_Ready_queue_enqueue
*
* This routine puts @a the_thread on the ready queue
diff --git a/cpukit/score/include/rtems/score/schedulersimplesmp.h b/cpukit/score/include/rtems/score/schedulersimplesmp.h
index c21b9d492e..20462ebe74 100644
--- a/cpukit/score/include/rtems/score/schedulersimplesmp.h
+++ b/cpukit/score/include/rtems/score/schedulersimplesmp.h
@@ -64,8 +64,8 @@ typedef struct {
_Scheduler_simple_smp_Yield, \
_Scheduler_simple_smp_Extract, \
_Scheduler_simple_smp_Enqueue_priority_fifo, \
- _Scheduler_simple_Allocate, \
- _Scheduler_simple_Free, \
+ _Scheduler_default_Allocate, \
+ _Scheduler_default_Free, \
_Scheduler_simple_Update, \
_Scheduler_simple_smp_Enqueue_priority_fifo, \
_Scheduler_simple_smp_Enqueue_priority_lifo, \
diff --git a/cpukit/score/src/schedulerdefaultallocatefree.c b/cpukit/score/src/schedulerdefaultallocatefree.c
new file mode 100644
index 0000000000..37f0981038
--- /dev/null
+++ b/cpukit/score/src/schedulerdefaultallocatefree.c
@@ -0,0 +1,38 @@
+/**
+ * @file
+ *
+ * @brief Scheduler Default Allocate and Release Operation
+ *
+ * @ingroup ScoreScheduler
+ */
+
+/*
+ * COPYRIGHT (c) 2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/score/scheduler.h>
+
+void *_Scheduler_default_Allocate(
+ Thread_Control *thread
+)
+{
+ ( void ) thread;
+
+ return ( void * )-1; /* maybe pick an appropriate poison value */
+}
+
+void _Scheduler_default_Free(
+ Thread_Control *thread
+)
+{
+ ( void ) thread;
+}
diff --git a/cpukit/score/src/schedulersimple.c b/cpukit/score/src/schedulersimple.c
index 84ffb7465a..bd6fe31b8b 100644
--- a/cpukit/score/src/schedulersimple.c
+++ b/cpukit/score/src/schedulersimple.c
@@ -23,25 +23,12 @@
#include <rtems/score/chainimpl.h>
#include <rtems/score/wkspace.h>
-void * _Scheduler_simple_Allocate(
- Thread_Control *the_thread
-)
-{
- return (void*)-1; /* maybe pick an appropriate poison value */
-}
-
void _Scheduler_simple_Update(
Thread_Control *the_thread
)
{
}
-void _Scheduler_simple_Free(
- Thread_Control *the_thread
-)
-{
-}
-
void _Scheduler_simple_Initialize ( void )
{
void *f;