diff options
Diffstat (limited to 'cpukit/include/rtems/score/scheduleredfimpl.h')
-rw-r--r-- | cpukit/include/rtems/score/scheduleredfimpl.h | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/cpukit/include/rtems/score/scheduleredfimpl.h b/cpukit/include/rtems/score/scheduleredfimpl.h index e0a07a8915..8aa0388537 100644 --- a/cpukit/include/rtems/score/scheduleredfimpl.h +++ b/cpukit/include/rtems/score/scheduleredfimpl.h @@ -39,7 +39,7 @@ #define _RTEMS_SCORE_SCHEDULEREDFIMPL_H #include <rtems/score/scheduleredf.h> -#include <rtems/score/schedulerimpl.h> +#include <rtems/score/scheduleruniimpl.h> #ifdef __cplusplus extern "C" { @@ -67,7 +67,7 @@ extern "C" { * * @return The scheduler context of @a scheduler. */ -RTEMS_INLINE_ROUTINE Scheduler_EDF_Context * +static inline Scheduler_EDF_Context * _Scheduler_EDF_Get_context( const Scheduler_Control *scheduler ) { return (Scheduler_EDF_Context *) _Scheduler_Get_context( scheduler ); @@ -80,7 +80,7 @@ RTEMS_INLINE_ROUTINE Scheduler_EDF_Context * * * @return The EDF scheduler node of @a the_thread. */ -RTEMS_INLINE_ROUTINE Scheduler_EDF_Node *_Scheduler_EDF_Thread_get_node( +static inline Scheduler_EDF_Node *_Scheduler_EDF_Thread_get_node( Thread_Control *the_thread ) { @@ -94,7 +94,7 @@ RTEMS_INLINE_ROUTINE Scheduler_EDF_Node *_Scheduler_EDF_Thread_get_node( * * @return The corresponding scheduler EDF node. */ -RTEMS_INLINE_ROUTINE Scheduler_EDF_Node * _Scheduler_EDF_Node_downcast( +static inline Scheduler_EDF_Node * _Scheduler_EDF_Node_downcast( Scheduler_Node *node ) { @@ -110,7 +110,7 @@ RTEMS_INLINE_ROUTINE Scheduler_EDF_Node * _Scheduler_EDF_Node_downcast( * @retval true @a left is less than the priority of @a right. * @retval false @a left is greater or equal than the priority of @a right. */ -RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Less( +static inline bool _Scheduler_EDF_Less( const void *left, const RBTree_Node *right ) @@ -120,7 +120,7 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Less( Priority_Control prio_left; Priority_Control prio_right; - the_left = left; + the_left = (const Priority_Control *) left; the_right = RTEMS_CONTAINER_OF( right, Scheduler_EDF_Node, Node ); prio_left = *the_left; @@ -138,7 +138,7 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Less( * @retval true @a left is less or equal than the priority of @a right. * @retval false @a left is greater than the priority of @a right. */ -RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Priority_less_equal( +static inline bool _Scheduler_EDF_Priority_less_equal( const void *left, const RBTree_Node *right ) @@ -148,7 +148,7 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Priority_less_equal( Priority_Control prio_left; Priority_Control prio_right; - the_left = left; + the_left = (const Priority_Control *) left; the_right = RTEMS_CONTAINER_OF( right, Scheduler_EDF_Node, Node ); prio_left = *the_left; @@ -165,7 +165,7 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_EDF_Priority_less_equal( * @param node The node to be inserted. * @param insert_priority The priority with which the node will be inserted. */ -RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Enqueue( +static inline void _Scheduler_EDF_Enqueue( Scheduler_EDF_Context *context, Scheduler_EDF_Node *node, Priority_Control insert_priority @@ -185,7 +185,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Enqueue( * @param[in, out] context The context to extract the node from. * @param[in, out] node The node to extract. */ -RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Extract( +static inline void _Scheduler_EDF_Extract( Scheduler_EDF_Context *context, Scheduler_EDF_Node *node ) @@ -200,7 +200,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Extract( * @param the_thread The thread is not used in this method. * @param[in, out] node The node to be extracted. */ -RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Extract_body( +static inline void _Scheduler_EDF_Extract_body( const Scheduler_Control *scheduler, Thread_Control *the_thread, Scheduler_Node *node @@ -216,30 +216,23 @@ RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Extract_body( } /** - * @brief Schedules the next ready thread as the heir. + * @brief Gets the highest priority ready thread of the scheduler. * - * @param scheduler The scheduler instance to schedule the minimum of the context of. - * @param the_thread This parameter is not used. - * @param force_dispatch Indicates whether the current heir is blocked even if it is - * not set as preemptible. + * @param scheduler is the scheduler. */ -RTEMS_INLINE_ROUTINE void _Scheduler_EDF_Schedule_body( - const Scheduler_Control *scheduler, - Thread_Control *the_thread, - bool force_dispatch +static inline Thread_Control *_Scheduler_EDF_Get_highest_ready( + const Scheduler_Control *scheduler ) { Scheduler_EDF_Context *context; RBTree_Node *first; Scheduler_EDF_Node *node; - (void) the_thread; - context = _Scheduler_EDF_Get_context( scheduler ); first = _RBTree_Minimum( &context->Ready ); node = RTEMS_CONTAINER_OF( first, Scheduler_EDF_Node, Node ); - _Scheduler_Update_heir( node->Base.owner, force_dispatch ); + return node->Base.owner; } /** @} */ |