diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-24 13:12:38 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2013-07-26 11:55:44 +0200 |
commit | c6e21ee18f71aa78ca6420bc835ab6b7e2dbcc65 (patch) | |
tree | dd620b9620437fdcbfd61d1097ecfafdd511ccb0 /cpukit/score/inline/rtems/score/scheduler.inl | |
parent | score: Create schedulerpriority impl header (diff) | |
download | rtems-c6e21ee18f71aa78ca6420bc835ab6b7e2dbcc65.tar.bz2 |
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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/schedulerimpl.h (renamed from cpukit/score/inline/rtems/score/scheduler.inl) | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/cpukit/score/inline/rtems/score/scheduler.inl b/cpukit/score/include/rtems/score/schedulerimpl.h index 67d8327e36..5ea4bb8b74 100644 --- a/cpukit/score/inline/rtems/score/scheduler.inl +++ b/cpukit/score/include/rtems/score/schedulerimpl.h @@ -16,12 +16,14 @@ * http://www.rtems.com/license/LICENSE. */ -#ifndef _RTEMS_SCORE_SCHEDULER_H -# error "Never use <rtems/score/scheduler.inl> directly; include <rtems/score/scheduler.h> instead." -#endif +#ifndef _RTEMS_SCORE_SCHEDULERIMPL_H +#define _RTEMS_SCORE_SCHEDULERIMPL_H + +#include <rtems/score/scheduler.h> -#ifndef _RTEMS_SCORE_SCHEDULER_INL -#define _RTEMS_SCORE_SCHEDULER_INL +#ifdef __cplusplus +extern "C" { +#endif /** * @addtogroup ScoreScheduler @@ -29,6 +31,15 @@ /**@{**/ /** + * @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. * @@ -226,7 +237,25 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Start_idle( ( *_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 */ |