From c6e21ee18f71aa78ca6420bc835ab6b7e2dbcc65 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 24 Jul 2013 13:12:38 +0200 Subject: score: Create scheduler implementation header Move implementation specific parts of scheduler.h and scheduler.inl into new header file schedulerimpl.h. The scheduler.h contains now only the application visible API. --- cpukit/posix/src/nanosleep.c | 9 +- cpukit/posix/src/sched_yield.c | 11 +- cpukit/rtems/src/clocktick.c | 4 +- cpukit/rtems/src/ratemoncancel.c | 6 +- cpukit/rtems/src/ratemondelete.c | 6 +- cpukit/rtems/src/ratemonperiod.c | 7 +- cpukit/rtems/src/taskwakeafter.c | 13 +- cpukit/sapi/src/exinit.c | 3 +- cpukit/score/Makefile.am | 2 +- cpukit/score/include/rtems/score/scheduler.h | 28 --- cpukit/score/include/rtems/score/schedulerimpl.h | 261 +++++++++++++++++++++++ cpukit/score/inline/rtems/score/scheduler.inl | 232 -------------------- cpukit/score/preinstall.am | 8 +- cpukit/score/src/coremutexseize.c | 1 + cpukit/score/src/scheduler.c | 4 +- cpukit/score/src/schedulercbsunblock.c | 3 +- cpukit/score/src/schedulerdefaultstartidle.c | 2 +- cpukit/score/src/schedulerdefaulttick.c | 3 +- cpukit/score/src/scheduleredf.c | 5 +- cpukit/score/src/scheduleredfunblock.c | 1 + cpukit/score/src/threadchangepriority.c | 6 +- cpukit/score/src/threadclearstate.c | 13 +- cpukit/score/src/threadclose.c | 11 +- cpukit/score/src/threadinitialize.c | 10 +- cpukit/score/src/threadready.c | 13 +- cpukit/score/src/threadsetpriority.c | 3 +- cpukit/score/src/threadsetstate.c | 13 +- cpukit/score/src/threadsettransient.c | 14 +- cpukit/score/src/threadstart.c | 12 +- 29 files changed, 305 insertions(+), 399 deletions(-) create mode 100644 cpukit/score/include/rtems/score/schedulerimpl.h delete mode 100644 cpukit/score/inline/rtems/score/scheduler.inl diff --git a/cpukit/posix/src/nanosleep.c b/cpukit/posix/src/nanosleep.c index 1476c17c51..84ac832955 100644 --- a/cpukit/posix/src/nanosleep.c +++ b/cpukit/posix/src/nanosleep.c @@ -21,16 +21,13 @@ #include #include -#include -#include -#include +#include +#include #include +#include #include #include -#include -#include - /* * 14.2.5 High Resolution Sleep, P1003.1b-1993, p. 269 */ diff --git a/cpukit/posix/src/sched_yield.c b/cpukit/posix/src/sched_yield.c index d976f10192..15a8c52e2a 100644 --- a/cpukit/posix/src/sched_yield.c +++ b/cpukit/posix/src/sched_yield.c @@ -19,15 +19,10 @@ #endif #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include int sched_yield( void ) { diff --git a/cpukit/rtems/src/clocktick.c b/cpukit/rtems/src/clocktick.c index 5e46e94ee5..a6e4ac30cd 100644 --- a/cpukit/rtems/src/clocktick.c +++ b/cpukit/rtems/src/clocktick.c @@ -18,10 +18,8 @@ #include "config.h" #endif -#include -#include #include -#include +#include #include #include #include diff --git a/cpukit/rtems/src/ratemoncancel.c b/cpukit/rtems/src/ratemoncancel.c index 81b28b2bbd..8303afde45 100644 --- a/cpukit/rtems/src/ratemoncancel.c +++ b/cpukit/rtems/src/ratemoncancel.c @@ -18,12 +18,8 @@ #include "config.h" #endif -#include -#include -#include -#include -#include #include +#include #include #include diff --git a/cpukit/rtems/src/ratemondelete.c b/cpukit/rtems/src/ratemondelete.c index d05d03b2c9..feef5cd4f4 100644 --- a/cpukit/rtems/src/ratemondelete.c +++ b/cpukit/rtems/src/ratemondelete.c @@ -18,12 +18,8 @@ #include "config.h" #endif -#include -#include -#include -#include -#include #include +#include #include #include diff --git a/cpukit/rtems/src/ratemonperiod.c b/cpukit/rtems/src/ratemonperiod.c index 93a76a085f..078b06d714 100644 --- a/cpukit/rtems/src/ratemonperiod.c +++ b/cpukit/rtems/src/ratemonperiod.c @@ -18,13 +18,10 @@ #include "config.h" #endif -#include -#include -#include -#include -#include #include +#include #include +#include #include bool _Rate_monotonic_Get_status( diff --git a/cpukit/rtems/src/taskwakeafter.c b/cpukit/rtems/src/taskwakeafter.c index 2869bfeaa3..59c4f07a69 100644 --- a/cpukit/rtems/src/taskwakeafter.c +++ b/cpukit/rtems/src/taskwakeafter.c @@ -18,20 +18,9 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include #include #include -#include -#include -#include -#include +#include #include rtems_status_code rtems_task_wake_after( diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c index d235d59bd9..a7b16611d7 100644 --- a/cpukit/sapi/src/exinit.c +++ b/cpukit/sapi/src/exinit.c @@ -48,7 +48,8 @@ #include #endif #include -#include +#include +#include #include #include #include diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am index 8c422a5634..09a11eb02b 100644 --- a/cpukit/score/Makefile.am +++ b/cpukit/score/Makefile.am @@ -44,6 +44,7 @@ include_rtems_score_HEADERS += include/rtems/score/prioritybitmap.h include_rtems_score_HEADERS += include/rtems/score/rbtree.h include_rtems_score_HEADERS += include/rtems/score/rbtreeimpl.h include_rtems_score_HEADERS += include/rtems/score/scheduler.h +include_rtems_score_HEADERS += include/rtems/score/schedulerimpl.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 @@ -99,7 +100,6 @@ endif ## inline 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/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/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h index 70b9e33fd4..2e5d779076 100644 --- a/cpukit/score/include/rtems/score/scheduler.h +++ b/cpukit/score/include/rtems/score/scheduler.h @@ -22,7 +22,6 @@ #include #include #include -#include #ifdef __cplusplus extern "C" { @@ -126,29 +125,6 @@ typedef struct { */ extern Scheduler_Control _Scheduler; -/** - * Macro testing whether @a p1 has lower priority than @a p2 - * in the intuitive sense of priority. - */ -#define _Scheduler_Is_priority_lower_than( _p1, _p2 ) \ - (_Scheduler_Priority_compare(_p1,_p2) < 0) - -/** - * Macro testing whether @a p1 has higher priority than @a p2 - * in the intuitive sense of priority. - */ -#define _Scheduler_Is_priority_higher_than( _p1, _p2 ) \ - (_Scheduler_Priority_compare(_p1,_p2) > 0) - -/** - * @brief Initializes the scheduler to the policy chosen by the user. - * - * This routine initializes the scheduler to the policy chosen by the user - * through confdefs, or to the priority scheduler with ready chains by - * default. - */ -void _Scheduler_Handler_initialization( void ); - /** * @brief Performs tick operations depending on the CPU budget algorithm for * each executing thread. @@ -168,10 +144,6 @@ void _Scheduler_default_Start_idle( Per_CPU_Control *processor ); -#ifndef __RTEMS_APPLICATION__ -#include -#endif - /**@}*/ #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h new file mode 100644 index 0000000000..5ea4bb8b74 --- /dev/null +++ b/cpukit/score/include/rtems/score/schedulerimpl.h @@ -0,0 +1,261 @@ +/** + * @file + * + * @brief Inlined Routines Associated with the Manipulation of the Scheduler + * + * This inline file contains all of the inlined routines associated with + * the manipulation of the scheduler. + */ + +/* + * Copyright (C) 2010 Gedare Bloom. + * 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. + */ + +#ifndef _RTEMS_SCORE_SCHEDULERIMPL_H +#define _RTEMS_SCORE_SCHEDULERIMPL_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @addtogroup ScoreScheduler + */ +/**@{**/ + +/** + * @brief Initializes the scheduler to the policy chosen by the user. + * + * This routine initializes the scheduler to the policy chosen by the user + * through confdefs, or to the priority scheduler with ready chains by + * default. + */ +void _Scheduler_Handler_initialization( void ); + +/** + * The preferred method to add a new scheduler is to define the jump table + * entries and add a case to the _Scheduler_Initialize routine. + * + * Generic scheduling implementations that rely on the ready queue only can + * be found in the _Scheduler_queue_XXX functions. + */ + +/* + * Passing the Scheduler_Control* to these functions allows for multiple + * scheduler's to exist simultaneously, which could be useful on an SMP + * system. Then remote Schedulers may be accessible. How to protect such + * accesses remains an open problem. + */ + +/** + * @brief Scheduler schedule. + * + * This kernel routine implements the scheduling decision logic for + * the scheduler. It does NOT dispatch. + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) +{ + _Scheduler.Operations.schedule(); +} + +/** + * @brief Scheduler yield with a particular thread. + * + * This routine is invoked when a thread wishes to voluntarily transfer control + * of the processor to another thread. + * + * @param[in] thread The yielding thread. + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Yield( + Thread_Control *thread +) +{ + ( *_Scheduler.Operations.yield )( thread ); +} + +/** + * @brief Scheduler block. + * + * This routine removes @a the_thread from the scheduling decision for + * the scheduler. The primary task is to remove the thread from the + * ready queue. It performs any necessary schedulering operations + * including the selection of a new heir thread. + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Block( + Thread_Control *the_thread +) +{ + _Scheduler.Operations.block( the_thread ); +} + +/** + * @brief Scheduler unblock. + * + * This routine adds @a the_thread to the scheduling decision for + * the scheduler. The primary task is to add the thread to the + * ready queue per the schedulering policy and update any appropriate + * scheduling variables, for example the heir thread. + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( + Thread_Control *the_thread +) +{ + _Scheduler.Operations.unblock( the_thread ); +} + +/** + * @brief Scheduler allocate. + * + * This routine allocates @a the_thread->scheduler + */ +RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( + Thread_Control *the_thread +) +{ + return _Scheduler.Operations.allocate( the_thread ); +} + +/** + * @brief Scheduler free. + * + * This routine frees @a the_thread->scheduler + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Free( + Thread_Control *the_thread +) +{ + _Scheduler.Operations.free( the_thread ); +} + +/** + * @brief Scheduler update. + * + * This routine updates @a the_thread->scheduler + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Update( + Thread_Control *the_thread +) +{ + _Scheduler.Operations.update( the_thread ); +} + +/** + * @brief Scheduler enqueue. + * + * This routine enqueue @a the_thread->scheduler + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( + Thread_Control *the_thread +) +{ + _Scheduler.Operations.enqueue( the_thread ); +} + +/** + * @brief Scheduler enqueue first. + * + * This routine enqueue_first @a the_thread->scheduler + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( + Thread_Control *the_thread +) +{ + _Scheduler.Operations.enqueue_first( the_thread ); +} + +/** + * @brief Scheduler extract. + * + * This routine extract @a the_thread->scheduler + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Extract( + Thread_Control *the_thread +) +{ + _Scheduler.Operations.extract( the_thread ); +} + +/** + * @brief Scheduler priority compare. + * + * This routine compares two priorities. + */ +RTEMS_INLINE_ROUTINE int _Scheduler_Priority_compare( + Priority_Control p1, + Priority_Control p2 +) +{ + return _Scheduler.Operations.priority_compare(p1, p2); +} + +/** + * @brief Scheduler release job. + * + * This routine is called when a new period of task is issued. + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Release_job( + Thread_Control *the_thread, + uint32_t length +) +{ + _Scheduler.Operations.release_job(the_thread, length); +} + +/** + * @brief Scheduler method invoked at each clock tick. + * + * This method is invoked at each clock tick to allow the scheduler + * implementation to perform any activities required. For the + * scheduler which support standard RTEMS features, this includes + * time-slicing management. + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Tick( void ) +{ + _Scheduler.Operations.tick(); +} + +/** + * @brief Starts the idle thread for a particular processor. + * + * @param[in,out] thread The idle thread for the processor. + * @parma[in,out] processor The processor for the idle thread. + * + * @see _Thread_Create_idle(). + */ +RTEMS_INLINE_ROUTINE void _Scheduler_Start_idle( + Thread_Control *thread, + Per_CPU_Control *processor +) +{ + ( *_Scheduler.Operations.start_idle )( thread, processor ); +} + +/** + * Macro testing whether @a p1 has lower priority than @a p2 + * in the intuitive sense of priority. + */ +#define _Scheduler_Is_priority_lower_than( _p1, _p2 ) \ + (_Scheduler_Priority_compare(_p1,_p2) < 0) + +/** + * Macro testing whether @a p1 has higher priority than @a p2 + * in the intuitive sense of priority. + */ +#define _Scheduler_Is_priority_higher_than( _p1, _p2 ) \ + (_Scheduler_Priority_compare(_p1,_p2) > 0) + +/** @} */ + +#ifdef __cplusplus +} +#endif + +#endif +/* end of include file */ diff --git a/cpukit/score/inline/rtems/score/scheduler.inl b/cpukit/score/inline/rtems/score/scheduler.inl deleted file mode 100644 index 67d8327e36..0000000000 --- a/cpukit/score/inline/rtems/score/scheduler.inl +++ /dev/null @@ -1,232 +0,0 @@ -/** - * @file - * - * @brief Inlined Routines Associated with the Manipulation of the Scheduler - * - * This inline file contains all of the inlined routines associated with - * the manipulation of the scheduler. - */ - -/* - * Copyright (C) 2010 Gedare Bloom. - * 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. - */ - -#ifndef _RTEMS_SCORE_SCHEDULER_H -# error "Never use directly; include instead." -#endif - -#ifndef _RTEMS_SCORE_SCHEDULER_INL -#define _RTEMS_SCORE_SCHEDULER_INL - -/** - * @addtogroup ScoreScheduler - */ -/**@{**/ - -/** - * The preferred method to add a new scheduler is to define the jump table - * entries and add a case to the _Scheduler_Initialize routine. - * - * Generic scheduling implementations that rely on the ready queue only can - * be found in the _Scheduler_queue_XXX functions. - */ - -/* - * Passing the Scheduler_Control* to these functions allows for multiple - * scheduler's to exist simultaneously, which could be useful on an SMP - * system. Then remote Schedulers may be accessible. How to protect such - * accesses remains an open problem. - */ - -/** - * @brief Scheduler schedule. - * - * This kernel routine implements the scheduling decision logic for - * the scheduler. It does NOT dispatch. - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Schedule( void ) -{ - _Scheduler.Operations.schedule(); -} - -/** - * @brief Scheduler yield with a particular thread. - * - * This routine is invoked when a thread wishes to voluntarily transfer control - * of the processor to another thread. - * - * @param[in] thread The yielding thread. - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Yield( - Thread_Control *thread -) -{ - ( *_Scheduler.Operations.yield )( thread ); -} - -/** - * @brief Scheduler block. - * - * This routine removes @a the_thread from the scheduling decision for - * the scheduler. The primary task is to remove the thread from the - * ready queue. It performs any necessary schedulering operations - * including the selection of a new heir thread. - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Block( - Thread_Control *the_thread -) -{ - _Scheduler.Operations.block( the_thread ); -} - -/** - * @brief Scheduler unblock. - * - * This routine adds @a the_thread to the scheduling decision for - * the scheduler. The primary task is to add the thread to the - * ready queue per the schedulering policy and update any appropriate - * scheduling variables, for example the heir thread. - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Unblock( - Thread_Control *the_thread -) -{ - _Scheduler.Operations.unblock( the_thread ); -} - -/** - * @brief Scheduler allocate. - * - * This routine allocates @a the_thread->scheduler - */ -RTEMS_INLINE_ROUTINE void* _Scheduler_Allocate( - Thread_Control *the_thread -) -{ - return _Scheduler.Operations.allocate( the_thread ); -} - -/** - * @brief Scheduler free. - * - * This routine frees @a the_thread->scheduler - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Free( - Thread_Control *the_thread -) -{ - _Scheduler.Operations.free( the_thread ); -} - -/** - * @brief Scheduler update. - * - * This routine updates @a the_thread->scheduler - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Update( - Thread_Control *the_thread -) -{ - _Scheduler.Operations.update( the_thread ); -} - -/** - * @brief Scheduler enqueue. - * - * This routine enqueue @a the_thread->scheduler - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue( - Thread_Control *the_thread -) -{ - _Scheduler.Operations.enqueue( the_thread ); -} - -/** - * @brief Scheduler enqueue first. - * - * This routine enqueue_first @a the_thread->scheduler - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Enqueue_first( - Thread_Control *the_thread -) -{ - _Scheduler.Operations.enqueue_first( the_thread ); -} - -/** - * @brief Scheduler extract. - * - * This routine extract @a the_thread->scheduler - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Extract( - Thread_Control *the_thread -) -{ - _Scheduler.Operations.extract( the_thread ); -} - -/** - * @brief Scheduler priority compare. - * - * This routine compares two priorities. - */ -RTEMS_INLINE_ROUTINE int _Scheduler_Priority_compare( - Priority_Control p1, - Priority_Control p2 -) -{ - return _Scheduler.Operations.priority_compare(p1, p2); -} - -/** - * @brief Scheduler release job. - * - * This routine is called when a new period of task is issued. - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Release_job( - Thread_Control *the_thread, - uint32_t length -) -{ - _Scheduler.Operations.release_job(the_thread, length); -} - -/** - * @brief Scheduler method invoked at each clock tick. - * - * This method is invoked at each clock tick to allow the scheduler - * implementation to perform any activities required. For the - * scheduler which support standard RTEMS features, this includes - * time-slicing management. - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Tick( void ) -{ - _Scheduler.Operations.tick(); -} - -/** - * @brief Starts the idle thread for a particular processor. - * - * @param[in,out] thread The idle thread for the processor. - * @parma[in,out] processor The processor for the idle thread. - * - * @see _Thread_Create_idle(). - */ -RTEMS_INLINE_ROUTINE void _Scheduler_Start_idle( - Thread_Control *thread, - Per_CPU_Control *processor -) -{ - ( *_Scheduler.Operations.start_idle )( thread, processor ); -} - -/** @} */ - -#endif -/* end of include file */ diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am index d650a4664c..9c28a2d7c4 100644 --- a/cpukit/score/preinstall.am +++ b/cpukit/score/preinstall.am @@ -159,6 +159,10 @@ $(PROJECT_INCLUDE)/rtems/score/scheduler.h: include/rtems/score/scheduler.h $(PR $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/scheduler.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/scheduler.h +$(PROJECT_INCLUDE)/rtems/score/schedulerimpl.h: include/rtems/score/schedulerimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulerimpl.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulerimpl.h + $(PROJECT_INCLUDE)/rtems/score/schedulercbs.h: include/rtems/score/schedulercbs.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/schedulercbs.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/schedulercbs.h @@ -327,10 +331,6 @@ $(PROJECT_INCLUDE)/rtems/score/prioritybitmap.inl: inline/rtems/score/prioritybi $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/prioritybitmap.inl PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/prioritybitmap.inl -$(PROJECT_INCLUDE)/rtems/score/scheduler.inl: inline/rtems/score/scheduler.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/scheduler.inl -PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/scheduler.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/coremutexseize.c b/cpukit/score/src/coremutexseize.c index 3da513a77b..dee9f7d5f7 100644 --- a/cpukit/score/src/coremutexseize.c +++ b/cpukit/score/src/coremutexseize.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/cpukit/score/src/scheduler.c b/cpukit/score/src/scheduler.c index 2ee37e7634..a6331fe029 100644 --- a/cpukit/score/src/scheduler.c +++ b/cpukit/score/src/scheduler.c @@ -18,9 +18,7 @@ #include "config.h" #endif -#include -#include -#include +#include void _Scheduler_Handler_initialization(void) { diff --git a/cpukit/score/src/schedulercbsunblock.c b/cpukit/score/src/schedulercbsunblock.c index 5d7b2d0afe..04e8a5c9a3 100644 --- a/cpukit/score/src/schedulercbsunblock.c +++ b/cpukit/score/src/schedulercbsunblock.c @@ -19,9 +19,8 @@ #include "config.h" #endif -#include -#include #include +#include #include void _Scheduler_CBS_Unblock( diff --git a/cpukit/score/src/schedulerdefaultstartidle.c b/cpukit/score/src/schedulerdefaultstartidle.c index 043fe68b52..9d772a6e2d 100644 --- a/cpukit/score/src/schedulerdefaultstartidle.c +++ b/cpukit/score/src/schedulerdefaultstartidle.c @@ -10,7 +10,7 @@ #include "config.h" #endif -#include +#include void _Scheduler_default_Start_idle( Thread_Control *thread, diff --git a/cpukit/score/src/schedulerdefaulttick.c b/cpukit/score/src/schedulerdefaulttick.c index a9bc58a8c2..47844ed4be 100644 --- a/cpukit/score/src/schedulerdefaulttick.c +++ b/cpukit/score/src/schedulerdefaulttick.c @@ -19,8 +19,7 @@ #include "config.h" #endif -#include -#include +#include #include #include diff --git a/cpukit/score/src/scheduleredf.c b/cpukit/score/src/scheduleredf.c index 6b1db632b2..0cb440a7d1 100644 --- a/cpukit/score/src/scheduleredf.c +++ b/cpukit/score/src/scheduleredf.c @@ -18,10 +18,9 @@ #include "config.h" #endif -#include -#include -#include #include +#include +#include static int _Scheduler_EDF_RBTree_compare_function ( diff --git a/cpukit/score/src/scheduleredfunblock.c b/cpukit/score/src/scheduleredfunblock.c index 0aeb7dec65..a9fc08ce21 100644 --- a/cpukit/score/src/scheduleredfunblock.c +++ b/cpukit/score/src/scheduleredfunblock.c @@ -19,6 +19,7 @@ #endif #include +#include #include void _Scheduler_EDF_Unblock( diff --git a/cpukit/score/src/threadchangepriority.c b/cpukit/score/src/threadchangepriority.c index 82b8efb721..3d770d285d 100644 --- a/cpukit/score/src/threadchangepriority.c +++ b/cpukit/score/src/threadchangepriority.c @@ -19,11 +19,9 @@ #include "config.h" #endif -#include -#include -#include -#include #include +#include +#include #include void _Thread_Change_priority( diff --git a/cpukit/score/src/threadclearstate.c b/cpukit/score/src/threadclearstate.c index 6e8cb48304..0a02bdd48e 100644 --- a/cpukit/score/src/threadclearstate.c +++ b/cpukit/score/src/threadclearstate.c @@ -18,18 +18,9 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include void _Thread_Clear_state( Thread_Control *the_thread, diff --git a/cpukit/score/src/threadclose.c b/cpukit/score/src/threadclose.c index 912e5d4271..da5f556084 100644 --- a/cpukit/score/src/threadclose.c +++ b/cpukit/score/src/threadclose.c @@ -18,16 +18,9 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include +#include #include #include #include diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 5c778a8b25..2075293fd2 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -17,18 +17,12 @@ #include "config.h" #endif -#include +#include #include -#include -#include -#include -#include #include #include -#include +#include #include -#include -#include #include #include #include diff --git a/cpukit/score/src/threadready.c b/cpukit/score/src/threadready.c index 0b5149c669..d926a19fff 100644 --- a/cpukit/score/src/threadready.c +++ b/cpukit/score/src/threadready.c @@ -18,18 +18,9 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include void _Thread_Ready( Thread_Control *the_thread diff --git a/cpukit/score/src/threadsetpriority.c b/cpukit/score/src/threadsetpriority.c index 1ae4a27197..f776014779 100644 --- a/cpukit/score/src/threadsetpriority.c +++ b/cpukit/score/src/threadsetpriority.c @@ -18,9 +18,8 @@ #include "config.h" #endif -#include -#include #include +#include void _Thread_Set_priority( Thread_Control *the_thread, diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c index abe5eebcf6..0b25442a38 100644 --- a/cpukit/score/src/threadsetstate.c +++ b/cpukit/score/src/threadsetstate.c @@ -21,18 +21,9 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include void _Thread_Set_state( Thread_Control *the_thread, diff --git a/cpukit/score/src/threadsettransient.c b/cpukit/score/src/threadsettransient.c index 5d22a52a1b..ecdbd71576 100644 --- a/cpukit/score/src/threadsettransient.c +++ b/cpukit/score/src/threadsettransient.c @@ -19,19 +19,9 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include -#include -#include +#include +#include void _Thread_Set_transient( Thread_Control *the_thread diff --git a/cpukit/score/src/threadstart.c b/cpukit/score/src/threadstart.c index dddf744206..82f8a2a235 100644 --- a/cpukit/score/src/threadstart.c +++ b/cpukit/score/src/threadstart.c @@ -19,18 +19,10 @@ #include "config.h" #endif -#include -#include -#include -#include -#include -#include -#include -#include #include -#include +#include +#include #include -#include bool _Thread_Start( Thread_Control *the_thread, -- cgit v1.2.3