forked from Imagelibrary/rtems
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
@@ -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" {
|
||||
|
||||
@@ -97,6 +97,11 @@ RTEMS_INLINE_ROUTINE uint32_t _Priority_Bits_index (
|
||||
* Priority Queue implemented by bit map
|
||||
*/
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user