summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-24 12:03:31 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-26 11:55:44 +0200
commitf068384e3c8fd31d4791e22b4c91e29fa907ff3b (patch)
tree45e5ff2ff56ac3288b6ebbefbb306ce5fb8f2cee
parentscore: Create schedulersimple impl header (diff)
downloadrtems-f068384e3c8fd31d4791e22b4c91e29fa907ff3b.tar.bz2
score: Create schedulerpriority impl header
Move implementation specific parts of schedulerpriority.h and schedulerpriority.inl into new header file schedulerpriorityimpl.h. The schedulerpriority.h contains now only the application visible API. Add missing includes. Remove superfluous includes. Move declaration of _Priority_Bit_map to prioritybitmap.inl since this variable is used only here. Remove second declaration of _Priority_Major_bit_map.
-rw-r--r--cpukit/score/Makefile.am2
-rw-r--r--cpukit/score/include/rtems/score/schedulerpriority.h18
-rw-r--r--cpukit/score/include/rtems/score/schedulerpriorityimpl.h (renamed from cpukit/score/inline/rtems/score/schedulerpriority.inl)18
-rw-r--r--cpukit/score/include/rtems/score/schedulersimpleimpl.h2
-rw-r--r--cpukit/score/inline/rtems/score/prioritybitmap.inl5
-rw-r--r--cpukit/score/preinstall.am8
-rw-r--r--cpukit/score/src/schedulercbs.c6
-rw-r--r--cpukit/score/src/schedulercbscleanup.c4
-rw-r--r--cpukit/score/src/schedulercbscreateserver.c4
-rw-r--r--cpukit/score/src/schedulercbsdestroyserver.c4
-rw-r--r--cpukit/score/src/scheduleredfunblock.c3
-rw-r--r--cpukit/score/src/schedulerpriority.c6
-rw-r--r--cpukit/score/src/schedulerpriorityblock.c10
-rw-r--r--cpukit/score/src/schedulerpriorityenqueue.c5
-rw-r--r--cpukit/score/src/schedulerpriorityenqueuefirst.c5
-rw-r--r--cpukit/score/src/schedulerpriorityextract.c5
-rw-r--r--cpukit/score/src/schedulerpriorityprioritycompare.c5
-rw-r--r--cpukit/score/src/schedulerpriorityschedule.c4
-rw-r--r--cpukit/score/src/schedulerpriorityunblock.c4
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c5
-rw-r--r--cpukit/score/src/schedulersimple.c6
-rw-r--r--cpukit/score/src/schedulersimpleextract.c5
-rw-r--r--cpukit/score/src/schedulersimpleschedule.c10
-rw-r--r--cpukit/score/src/schedulersimplesmp.c1
24 files changed, 45 insertions, 100 deletions
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index f04a904f94..8c422a5634 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -47,6 +47,7 @@ include_rtems_score_HEADERS += include/rtems/score/scheduler.h
include_rtems_score_HEADERS += include/rtems/score/schedulercbs.h
include_rtems_score_HEADERS += include/rtems/score/scheduleredf.h
include_rtems_score_HEADERS += include/rtems/score/schedulerpriority.h
+include_rtems_score_HEADERS += include/rtems/score/schedulerpriorityimpl.h
include_rtems_score_HEADERS += include/rtems/score/schedulersimple.h
include_rtems_score_HEADERS += include/rtems/score/schedulersimpleimpl.h
include_rtems_score_HEADERS += include/rtems/score/smp.h
@@ -99,7 +100,6 @@ endif
include_rtems_score_HEADERS += inline/rtems/score/object.inl
include_rtems_score_HEADERS += inline/rtems/score/prioritybitmap.inl
include_rtems_score_HEADERS += inline/rtems/score/scheduler.inl
-include_rtems_score_HEADERS += inline/rtems/score/schedulerpriority.inl
include_rtems_score_HEADERS += inline/rtems/score/states.inl
include_rtems_score_HEADERS += inline/rtems/score/thread.inl
include_rtems_score_HEADERS += inline/rtems/score/threadq.inl
diff --git a/cpukit/score/include/rtems/score/schedulerpriority.h b/cpukit/score/include/rtems/score/schedulerpriority.h
index abd48196f2..862f9e1c7d 100644
--- a/cpukit/score/include/rtems/score/schedulerpriority.h
+++ b/cpukit/score/include/rtems/score/schedulerpriority.h
@@ -20,7 +20,7 @@
#define _RTEMS_SCORE_SCHEDULERPRIORITY_H
#include <rtems/score/chain.h>
-#include <rtems/score/priority.h>
+#include <rtems/score/prioritybitmap.h>
#include <rtems/score/scheduler.h>
#ifdef __cplusplus
@@ -225,25 +225,11 @@ void _Scheduler_priority_Release_job (
uint32_t deadline
);
-/**
- * This is the major bit map.
- */
-extern volatile Priority_bit_map_Control _Priority_Major_bit_map;
-
-/**
- * This is the minor bit map.
- */
-extern Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/schedulerpriority.inl>
-#endif
+/**@}*/
#ifdef __cplusplus
}
#endif
-/**@}*/
-
#endif
/* end of include file */
diff --git a/cpukit/score/inline/rtems/score/schedulerpriority.inl b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
index 393ee09062..03568ed141 100644
--- a/cpukit/score/inline/rtems/score/schedulerpriority.inl
+++ b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
@@ -17,17 +17,17 @@
* http://www.rtems.com/license/LICENSE.
*/
-#ifndef _RTEMS_SCORE_SCHEDULERPRIORITY_H
-# error "Never use <rtems/score/schedulerpriority.inl> directly; include <rtems/score/schedulerpriority.h> instead."
-#endif
-
-#ifndef _RTEMS_SCORE_SCHEDULERPRIORITY_INL
-#define _RTEMS_SCORE_SCHEDULERPRIORITY_INL
+#ifndef _RTEMS_SCORE_SCHEDULERPRIORITYIMPL_H
+#define _RTEMS_SCORE_SCHEDULERPRIORITYIMPL_H
+#include <rtems/score/schedulerpriority.h>
#include <rtems/score/chainimpl.h>
-#include <rtems/score/thread.h>
#include <rtems/score/wkspace.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @addtogroup ScoreScheduler
*/
@@ -206,5 +206,9 @@ RTEMS_INLINE_ROUTINE int _Scheduler_priority_Priority_compare_body(
/** @} */
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* end of include file */
diff --git a/cpukit/score/include/rtems/score/schedulersimpleimpl.h b/cpukit/score/include/rtems/score/schedulersimpleimpl.h
index e8c4cc6cad..076d1a9258 100644
--- a/cpukit/score/include/rtems/score/schedulersimpleimpl.h
+++ b/cpukit/score/include/rtems/score/schedulersimpleimpl.h
@@ -20,6 +20,8 @@
#define _RTEMS_SCORE_SCHEDULERSIMPLEIMPL_H
#include <rtems/score/schedulersimple.h>
+#include <rtems/score/chainimpl.h>
+#include <rtems/score/thread.h>
#ifdef __cplusplus
extern "C" {
diff --git a/cpukit/score/inline/rtems/score/prioritybitmap.inl b/cpukit/score/inline/rtems/score/prioritybitmap.inl
index 70844fa0e3..19196ceea2 100644
--- a/cpukit/score/inline/rtems/score/prioritybitmap.inl
+++ b/cpukit/score/inline/rtems/score/prioritybitmap.inl
@@ -98,6 +98,11 @@ RTEMS_INLINE_ROUTINE uint32_t _Priority_Bits_index (
*/
/**
+ * This is the minor bit map.
+ */
+extern Priority_bit_map_Control _Priority_Bit_map[16] CPU_STRUCTURE_ALIGNMENT;
+
+/**
* This routine performs the initialization necessary for this handler.
*/
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index 35b57d055a..d650a4664c 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -171,6 +171,10 @@ $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.h: include/rtems/score/schedule
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.h
+$(PROJECT_INCLUDE)/rtems/score/schedulerpriorityimpl.h: include/rtems/score/schedulerpriorityimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+ $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulerpriorityimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulerpriorityimpl.h
+
$(PROJECT_INCLUDE)/rtems/score/schedulersimple.h: include/rtems/score/schedulersimple.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulersimple.h
@@ -327,10 +331,6 @@ $(PROJECT_INCLUDE)/rtems/score/scheduler.inl: inline/rtems/score/scheduler.inl $
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/scheduler.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/scheduler.inl
-$(PROJECT_INCLUDE)/rtems/score/schedulerpriority.inl: inline/rtems/score/schedulerpriority.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
- $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulerpriority.inl
-
$(PROJECT_INCLUDE)/rtems/score/states.inl: inline/rtems/score/states.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/states.inl
PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/states.inl
diff --git a/cpukit/score/src/schedulercbs.c b/cpukit/score/src/schedulercbs.c
index 7905387018..f3aa2c0261 100644
--- a/cpukit/score/src/schedulercbs.c
+++ b/cpukit/score/src/schedulercbs.c
@@ -18,11 +18,9 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
-#include <rtems/rtems/signal.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/wkspace.h>
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
diff --git a/cpukit/score/src/schedulercbscleanup.c b/cpukit/score/src/schedulercbscleanup.c
index abffeafdc6..c1aaa91891 100644
--- a/cpukit/score/src/schedulercbscleanup.c
+++ b/cpukit/score/src/schedulercbscleanup.c
@@ -18,10 +18,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/wkspace.h>
int _Scheduler_CBS_Cleanup (void)
{
diff --git a/cpukit/score/src/schedulercbscreateserver.c b/cpukit/score/src/schedulercbscreateserver.c
index 9f69fba821..e499b0ff27 100644
--- a/cpukit/score/src/schedulercbscreateserver.c
+++ b/cpukit/score/src/schedulercbscreateserver.c
@@ -18,10 +18,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/wkspace.h>
int _Scheduler_CBS_Create_server (
Scheduler_CBS_Parameters *params,
diff --git a/cpukit/score/src/schedulercbsdestroyserver.c b/cpukit/score/src/schedulercbsdestroyserver.c
index 5030b6f098..8fb1b7eb8e 100644
--- a/cpukit/score/src/schedulercbsdestroyserver.c
+++ b/cpukit/score/src/schedulercbsdestroyserver.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/wkspace.h>
int _Scheduler_CBS_Destroy_server (
Scheduler_CBS_Server_id server_id
diff --git a/cpukit/score/src/scheduleredfunblock.c b/cpukit/score/src/scheduleredfunblock.c
index 31ed6401af..0aeb7dec65 100644
--- a/cpukit/score/src/scheduleredfunblock.c
+++ b/cpukit/score/src/scheduleredfunblock.c
@@ -18,9 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/scheduleredf.h>
+#include <rtems/score/thread.h>
void _Scheduler_EDF_Unblock(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulerpriority.c b/cpukit/score/src/schedulerpriority.c
index e6176e8d05..7314da4965 100644
--- a/cpukit/score/src/schedulerpriority.c
+++ b/cpukit/score/src/schedulerpriority.c
@@ -18,11 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/prioritybitmap.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/schedulerpriorityimpl.h>
/* Instantiate any global variables needed by the priority scheduler */
volatile Priority_bit_map_Control _Priority_Major_bit_map;
diff --git a/cpukit/score/src/schedulerpriorityblock.c b/cpukit/score/src/schedulerpriorityblock.c
index d527907faf..d5f5840cba 100644
--- a/cpukit/score/src/schedulerpriorityblock.c
+++ b/cpukit/score/src/schedulerpriorityblock.c
@@ -20,15 +20,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/schedulerpriorityimpl.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulerpriorityenqueue.c b/cpukit/score/src/schedulerpriorityenqueue.c
index 89cf4a22b7..b1ecf34e56 100644
--- a/cpukit/score/src/schedulerpriorityenqueue.c
+++ b/cpukit/score/src/schedulerpriorityenqueue.c
@@ -18,10 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/schedulerpriorityimpl.h>
void _Scheduler_priority_Enqueue(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulerpriorityenqueuefirst.c b/cpukit/score/src/schedulerpriorityenqueuefirst.c
index f5b4940693..a18efbac4f 100644
--- a/cpukit/score/src/schedulerpriorityenqueuefirst.c
+++ b/cpukit/score/src/schedulerpriorityenqueuefirst.c
@@ -18,10 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/schedulerpriorityimpl.h>
void _Scheduler_priority_Enqueue_first(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulerpriorityextract.c b/cpukit/score/src/schedulerpriorityextract.c
index 02f6004d28..3000c80867 100644
--- a/cpukit/score/src/schedulerpriorityextract.c
+++ b/cpukit/score/src/schedulerpriorityextract.c
@@ -19,10 +19,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/schedulerpriorityimpl.h>
void _Scheduler_priority_Extract(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulerpriorityprioritycompare.c b/cpukit/score/src/schedulerpriorityprioritycompare.c
index 7d37707986..f8c13fe6c4 100644
--- a/cpukit/score/src/schedulerpriorityprioritycompare.c
+++ b/cpukit/score/src/schedulerpriorityprioritycompare.c
@@ -18,10 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/schedulerpriorityimpl.h>
int _Scheduler_priority_Priority_compare(
Priority_Control p1,
diff --git a/cpukit/score/src/schedulerpriorityschedule.c b/cpukit/score/src/schedulerpriorityschedule.c
index 3757387d06..22ed5f403c 100644
--- a/cpukit/score/src/schedulerpriorityschedule.c
+++ b/cpukit/score/src/schedulerpriorityschedule.c
@@ -18,9 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/schedulerpriorityimpl.h>
void _Scheduler_priority_Schedule(void)
{
diff --git a/cpukit/score/src/schedulerpriorityunblock.c b/cpukit/score/src/schedulerpriorityunblock.c
index f1d52e39dd..8afa3855bd 100644
--- a/cpukit/score/src/schedulerpriorityunblock.c
+++ b/cpukit/score/src/schedulerpriorityunblock.c
@@ -20,9 +20,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
+#include <rtems/score/schedulerpriorityimpl.h>
void _Scheduler_priority_Unblock (
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index 4c2b5996c1..e65bdb8af6 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -18,11 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
+#include <rtems/score/schedulerpriorityimpl.h>
#include <rtems/score/isr.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/schedulerpriority.h>
-#include <rtems/score/thread.h>
void _Scheduler_priority_Yield( Thread_Control *thread )
{
diff --git a/cpukit/score/src/schedulersimple.c b/cpukit/score/src/schedulersimple.c
index 6ba46a36b2..84ffb7465a 100644
--- a/cpukit/score/src/schedulersimple.c
+++ b/cpukit/score/src/schedulersimple.c
@@ -19,12 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulersimple.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/chainimpl.h>
#include <rtems/score/wkspace.h>
void * _Scheduler_simple_Allocate(
diff --git a/cpukit/score/src/schedulersimpleextract.c b/cpukit/score/src/schedulersimpleextract.c
index e5d6e78e2f..9cd0b02e8b 100644
--- a/cpukit/score/src/schedulersimpleextract.c
+++ b/cpukit/score/src/schedulersimpleextract.c
@@ -19,10 +19,9 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/thread.h>
#include <rtems/score/schedulersimple.h>
+#include <rtems/score/chainimpl.h>
+#include <rtems/score/thread.h>
void _Scheduler_simple_Extract(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulersimpleschedule.c b/cpukit/score/src/schedulersimpleschedule.c
index e41fa96483..b60f096b09 100644
--- a/cpukit/score/src/schedulersimpleschedule.c
+++ b/cpukit/score/src/schedulersimpleschedule.c
@@ -18,16 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/percpu.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/thread.h>
#include <rtems/score/schedulersimple.h>
+#include <rtems/score/chainimpl.h>
void _Scheduler_simple_Schedule(void)
{
diff --git a/cpukit/score/src/schedulersimplesmp.c b/cpukit/score/src/schedulersimplesmp.c
index b197af5cd8..55c40a67e8 100644
--- a/cpukit/score/src/schedulersimplesmp.c
+++ b/cpukit/score/src/schedulersimplesmp.c
@@ -20,6 +20,7 @@
#include <rtems/score/schedulersimplesmp.h>
#include <rtems/score/schedulersimpleimpl.h>
+#include <rtems/score/wkspace.h>
static Scheduler_simple_smp_Control *_Scheduler_simple_smp_Instance( void )
{