diff options
Diffstat (limited to 'cpukit/score/include/rtems/score')
12 files changed, 5 insertions, 107 deletions
diff --git a/cpukit/score/include/rtems/score/scheduler.h b/cpukit/score/include/rtems/score/scheduler.h index 1e6236fa4d..2e9aba5072 100644 --- a/cpukit/score/include/rtems/score/scheduler.h +++ b/cpukit/score/include/rtems/score/scheduler.h @@ -129,12 +129,6 @@ typedef struct { Priority_Control ); - /** @see _Scheduler_Priority_compare() */ - int ( *priority_compare )( - Priority_Control, - Priority_Control - ); - /** @see _Scheduler_Release_job() */ void ( *release_job ) ( const Scheduler_Control *, diff --git a/cpukit/score/include/rtems/score/schedulercbs.h b/cpukit/score/include/rtems/score/schedulercbs.h index e390532343..397488fc40 100644 --- a/cpukit/score/include/rtems/score/schedulercbs.h +++ b/cpukit/score/include/rtems/score/schedulercbs.h @@ -59,7 +59,6 @@ extern "C" { _Scheduler_CBS_Node_initialize, /* node initialize entry point */ \ _Scheduler_default_Node_destroy, /* node destroy entry point */ \ _Scheduler_EDF_Update_priority, /* update priority entry point */ \ - _Scheduler_EDF_Priority_compare, /* compares two priorities */ \ _Scheduler_CBS_Release_job, /* new period of task */ \ _Scheduler_default_Tick, /* tick entry point */ \ _Scheduler_default_Start_idle /* start idle entry point */ \ diff --git a/cpukit/score/include/rtems/score/scheduleredf.h b/cpukit/score/include/rtems/score/scheduleredf.h index 137ea3abde..7d513ca416 100644 --- a/cpukit/score/include/rtems/score/scheduleredf.h +++ b/cpukit/score/include/rtems/score/scheduleredf.h @@ -52,7 +52,6 @@ extern "C" { _Scheduler_EDF_Node_initialize, /* node initialize entry point */ \ _Scheduler_default_Node_destroy, /* node destroy entry point */ \ _Scheduler_EDF_Update_priority, /* update priority entry point */ \ - _Scheduler_EDF_Priority_compare, /* compares two priorities */ \ _Scheduler_EDF_Release_job, /* new period of task */ \ _Scheduler_default_Tick, /* tick entry point */ \ _Scheduler_default_Start_idle /* start idle entry point */ \ @@ -226,19 +225,6 @@ Scheduler_Void_or_thread _Scheduler_EDF_Yield( ); /** - * @brief Explicitly compare absolute dedlines (priorities) of threads. - * - * This routine explicitly compares absolute dedlines (priorities) of threads. - * In case of EDF scheduling time overflow is taken into account. - * - * @retval >0 for p1 > p2; 0 for p1 == p2; <0 for p1 < p2. - */ -int _Scheduler_EDF_Priority_compare ( - Priority_Control p1, - Priority_Control p2 -); - -/** * @brief Called when a new job of task is released. * * This routine is called when a new job of task is released. diff --git a/cpukit/score/include/rtems/score/scheduleredfimpl.h b/cpukit/score/include/rtems/score/scheduleredfimpl.h index 4feea71e51..e831caf9f9 100644 --- a/cpukit/score/include/rtems/score/scheduleredfimpl.h +++ b/cpukit/score/include/rtems/score/scheduleredfimpl.h @@ -44,6 +44,11 @@ RTEMS_INLINE_ROUTINE Scheduler_EDF_Node *_Scheduler_EDF_Thread_get_node( return (Scheduler_EDF_Node *) _Scheduler_Thread_get_node( the_thread ); } +int _Scheduler_EDF_Priority_compare ( + Priority_Control p1, + Priority_Control p2 +); + RBTree_Compare_result _Scheduler_EDF_Compare( const RBTree_Node* n1, const RBTree_Node* n2 diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h index bfc6df330a..50061fbe67 100644 --- a/cpukit/score/include/rtems/score/schedulerimpl.h +++ b/cpukit/score/include/rtems/score/schedulerimpl.h @@ -482,31 +482,6 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Update_priority( } /** - * @brief Compares two priority values. - * - * @param[in] scheduler The scheduler instance. - * @param[in] p1 The first priority value. - * @param[in] p2 The second priority value. - * - * @retval negative The value @a p1 encodes a lower priority than @a p2 in the - * intuitive sense of priority. - * @retval 0 The priorities @a p1 and @a p2 are equal. - * @retval positive The value @a p1 encodes a higher priority than @a p2 in the - * intuitive sense of priority. - * - * @see _Scheduler_Is_priority_lower_than() and - * _Scheduler_Is_priority_higher_than(). - */ -RTEMS_INLINE_ROUTINE int _Scheduler_Priority_compare( - const Scheduler_Control *scheduler, - Priority_Control p1, - Priority_Control p2 -) -{ - return ( *scheduler->Operations.priority_compare )( p1, p2 ); -} - -/** * @brief Releases a job of a thread with respect to the scheduler. * * @param[in] the_thread The thread. @@ -746,32 +721,6 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Generic_block( } } -/** - * @brief Returns true if @a p1 encodes a lower priority than @a p2 in the - * intuitive sense of priority. - */ -RTEMS_INLINE_ROUTINE bool _Scheduler_Is_priority_lower_than( - const Scheduler_Control *scheduler, - Priority_Control p1, - Priority_Control p2 -) -{ - return _Scheduler_Priority_compare( scheduler, p1, p2 ) < 0; -} - -/** - * @brief Returns true if @a p1 encodes a higher priority than @a p2 in the - * intuitive sense of priority. - */ -RTEMS_INLINE_ROUTINE bool _Scheduler_Is_priority_higher_than( - const Scheduler_Control *scheduler, - Priority_Control p1, - Priority_Control p2 -) -{ - return _Scheduler_Priority_compare( scheduler, p1, p2 ) > 0; -} - RTEMS_INLINE_ROUTINE uint32_t _Scheduler_Get_processor_count( const Scheduler_Control *scheduler ) diff --git a/cpukit/score/include/rtems/score/schedulerpriority.h b/cpukit/score/include/rtems/score/schedulerpriority.h index 5859af12f3..07599416d6 100644 --- a/cpukit/score/include/rtems/score/schedulerpriority.h +++ b/cpukit/score/include/rtems/score/schedulerpriority.h @@ -49,7 +49,6 @@ extern "C" { _Scheduler_default_Node_initialize, /* node initialize entry point */ \ _Scheduler_default_Node_destroy, /* node destroy entry point */ \ _Scheduler_priority_Update_priority, /* update priority entry point */ \ - _Scheduler_priority_Priority_compare, /* compares two priorities */ \ _Scheduler_default_Release_job, /* new period of task */ \ _Scheduler_default_Tick, /* tick entry point */ \ _Scheduler_default_Start_idle /* start idle entry point */ \ @@ -189,18 +188,6 @@ Scheduler_Void_or_thread _Scheduler_priority_Yield( Thread_Control *the_thread ); -/** - * @brief Compare two priorities. - * - * This routine compares two priorities. - * - * @retval >0 for p1 > p2; 0 for p1 == p2; <0 for p1 < p2. - */ -int _Scheduler_priority_Priority_compare( - Priority_Control p1, - Priority_Control p2 -); - /**@}*/ #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h b/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h index dd0085a681..e2d6f3b1c7 100644 --- a/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h +++ b/cpukit/score/include/rtems/score/schedulerpriorityaffinitysmp.h @@ -59,7 +59,6 @@ extern "C" { _Scheduler_priority_affinity_SMP_Node_initialize, \ _Scheduler_default_Node_destroy, \ _Scheduler_priority_SMP_Update_priority, \ - _Scheduler_priority_Priority_compare, \ _Scheduler_default_Release_job, \ _Scheduler_default_Tick, \ _Scheduler_SMP_Start_idle, \ diff --git a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h index a18840fb4c..d709818473 100644 --- a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h +++ b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h @@ -219,23 +219,6 @@ RTEMS_INLINE_ROUTINE void _Scheduler_priority_Ready_queue_update( ); } -/** - * @brief Priority comparison. - * - * This routine implements priority comparison for priority-based - * scheduling. - * - * @return >0 for higher priority, 0 for equal and <0 for lower priority. - */ -RTEMS_INLINE_ROUTINE int _Scheduler_priority_Priority_compare_body( - Priority_Control p1, - Priority_Control p2 -) -{ - /* High priority in priority scheduler is represented by low numbers. */ - return ( p2 - p1 ); -} - /** @} */ #ifdef __cplusplus diff --git a/cpukit/score/include/rtems/score/schedulerprioritysmp.h b/cpukit/score/include/rtems/score/schedulerprioritysmp.h index d8ce7dc1dd..d550c78836 100644 --- a/cpukit/score/include/rtems/score/schedulerprioritysmp.h +++ b/cpukit/score/include/rtems/score/schedulerprioritysmp.h @@ -88,7 +88,6 @@ typedef struct { _Scheduler_priority_SMP_Node_initialize, \ _Scheduler_default_Node_destroy, \ _Scheduler_priority_SMP_Update_priority, \ - _Scheduler_priority_Priority_compare, \ _Scheduler_default_Release_job, \ _Scheduler_default_Tick, \ _Scheduler_SMP_Start_idle \ diff --git a/cpukit/score/include/rtems/score/schedulersimple.h b/cpukit/score/include/rtems/score/schedulersimple.h index a546ed629f..9e40c4ac44 100644 --- a/cpukit/score/include/rtems/score/schedulersimple.h +++ b/cpukit/score/include/rtems/score/schedulersimple.h @@ -49,7 +49,6 @@ extern "C" { _Scheduler_default_Node_initialize, /* node initialize entry point */ \ _Scheduler_default_Node_destroy, /* node destroy entry point */ \ _Scheduler_default_Update_priority, /* update priority entry point */ \ - _Scheduler_priority_Priority_compare, /* compares two priorities */ \ _Scheduler_default_Release_job, /* new period of task */ \ _Scheduler_default_Tick, /* tick entry point */ \ _Scheduler_default_Start_idle /* start idle entry point */ \ diff --git a/cpukit/score/include/rtems/score/schedulersimplesmp.h b/cpukit/score/include/rtems/score/schedulersimplesmp.h index 342a574174..b9433534c6 100644 --- a/cpukit/score/include/rtems/score/schedulersimplesmp.h +++ b/cpukit/score/include/rtems/score/schedulersimplesmp.h @@ -71,7 +71,6 @@ typedef struct { _Scheduler_simple_SMP_Node_initialize, \ _Scheduler_default_Node_destroy, \ _Scheduler_simple_SMP_Update_priority, \ - _Scheduler_priority_Priority_compare, \ _Scheduler_default_Release_job, \ _Scheduler_default_Tick, \ _Scheduler_SMP_Start_idle \ diff --git a/cpukit/score/include/rtems/score/schedulerstrongapa.h b/cpukit/score/include/rtems/score/schedulerstrongapa.h index 5222cd0605..4f95aac8fb 100644 --- a/cpukit/score/include/rtems/score/schedulerstrongapa.h +++ b/cpukit/score/include/rtems/score/schedulerstrongapa.h @@ -88,7 +88,6 @@ typedef struct { _Scheduler_strong_APA_Node_initialize, \ _Scheduler_default_Node_destroy, \ _Scheduler_strong_APA_Update_priority, \ - _Scheduler_priority_Priority_compare, \ _Scheduler_default_Release_job, \ _Scheduler_default_Tick, \ _Scheduler_SMP_Start_idle \ |