mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 04:54:43 +08:00
score: Rename scheduler ask for help stuff
Rename the scheduler ask for help stuff since this will be replaced step by step with a second generation of the scheduler helping protocol. Keep the old one for now in parallel to reduce the patch set sizes. Update #2556.
This commit is contained in:
@@ -114,9 +114,9 @@ typedef struct {
|
||||
* @retval NULL It was possible to schedule the thread needing help, and no
|
||||
* other thread needs help as a result.
|
||||
*
|
||||
* @see _Scheduler_Ask_for_help().
|
||||
* @see _Scheduler_Ask_for_help_X().
|
||||
*/
|
||||
Thread_Control *( *ask_for_help )(
|
||||
Thread_Control *( *ask_for_help_X )(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
@@ -323,14 +323,14 @@ Priority_Control _Scheduler_default_Map_priority(
|
||||
*
|
||||
* @retval NULL Always.
|
||||
*/
|
||||
Thread_Control *_Scheduler_default_Ask_for_help(
|
||||
Thread_Control *_Scheduler_default_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
);
|
||||
|
||||
#define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP \
|
||||
_Scheduler_default_Ask_for_help,
|
||||
_Scheduler_default_Ask_for_help_X,
|
||||
#else
|
||||
#define SCHEDULER_OPERATION_DEFAULT_ASK_FOR_HELP
|
||||
#endif
|
||||
|
||||
@@ -191,7 +191,7 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_Ask_for_help_visitor(
|
||||
THREAD_RESOURCE_NODE_TO_THREAD( resource_node );
|
||||
const Scheduler_Control *scheduler = _Scheduler_Get_own( offers_help );
|
||||
|
||||
next_needs_help = ( *scheduler->Operations.ask_for_help )(
|
||||
next_needs_help = ( *scheduler->Operations.ask_for_help_X )(
|
||||
scheduler,
|
||||
offers_help,
|
||||
previous_needs_help
|
||||
@@ -219,14 +219,14 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_Ask_for_help_visitor(
|
||||
*
|
||||
* @param[in] needs_help The thread needing help.
|
||||
*/
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_Ask_for_help(
|
||||
RTEMS_INLINE_ROUTINE void _Scheduler_Ask_for_help_X(
|
||||
Thread_Control *needs_help
|
||||
)
|
||||
{
|
||||
do {
|
||||
const Scheduler_Control *scheduler = _Scheduler_Get_own( needs_help );
|
||||
|
||||
needs_help = ( *scheduler->Operations.ask_for_help )(
|
||||
needs_help = ( *scheduler->Operations.ask_for_help_X )(
|
||||
scheduler,
|
||||
needs_help,
|
||||
needs_help
|
||||
@@ -260,7 +260,7 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Ask_for_help_if_necessary(
|
||||
node->help_state != SCHEDULER_HELP_ACTIVE_RIVAL
|
||||
|| _Scheduler_Node_get_user( node ) != needs_help
|
||||
) {
|
||||
_Scheduler_Ask_for_help( needs_help );
|
||||
_Scheduler_Ask_for_help_X( needs_help );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ extern "C" {
|
||||
_Scheduler_priority_affinity_SMP_Update_priority, \
|
||||
_Scheduler_default_Map_priority, \
|
||||
_Scheduler_default_Unmap_priority, \
|
||||
_Scheduler_priority_affinity_SMP_Ask_for_help, \
|
||||
_Scheduler_priority_affinity_SMP_Ask_for_help_X, \
|
||||
_Scheduler_priority_affinity_SMP_Node_initialize, \
|
||||
_Scheduler_default_Node_destroy, \
|
||||
_Scheduler_default_Release_job, \
|
||||
@@ -141,7 +141,7 @@ Thread_Control *_Scheduler_priority_affinity_SMP_Update_priority(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
Thread_Control *_Scheduler_priority_affinity_SMP_Ask_for_help(
|
||||
Thread_Control *_Scheduler_priority_affinity_SMP_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
|
||||
@@ -86,7 +86,7 @@ typedef struct {
|
||||
_Scheduler_priority_SMP_Update_priority, \
|
||||
_Scheduler_default_Map_priority, \
|
||||
_Scheduler_default_Unmap_priority, \
|
||||
_Scheduler_priority_SMP_Ask_for_help, \
|
||||
_Scheduler_priority_SMP_Ask_for_help_X, \
|
||||
_Scheduler_priority_SMP_Node_initialize, \
|
||||
_Scheduler_default_Node_destroy, \
|
||||
_Scheduler_default_Release_job, \
|
||||
@@ -120,7 +120,7 @@ Thread_Control *_Scheduler_priority_SMP_Update_priority(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
Thread_Control *_Scheduler_priority_SMP_Ask_for_help(
|
||||
Thread_Control *_Scheduler_priority_SMP_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *needs_help,
|
||||
Thread_Control *offers_help
|
||||
|
||||
@@ -69,7 +69,7 @@ typedef struct {
|
||||
_Scheduler_simple_SMP_Update_priority, \
|
||||
_Scheduler_default_Map_priority, \
|
||||
_Scheduler_default_Unmap_priority, \
|
||||
_Scheduler_simple_SMP_Ask_for_help, \
|
||||
_Scheduler_simple_SMP_Ask_for_help_X, \
|
||||
_Scheduler_simple_SMP_Node_initialize, \
|
||||
_Scheduler_default_Node_destroy, \
|
||||
_Scheduler_default_Release_job, \
|
||||
@@ -103,7 +103,7 @@ Thread_Control *_Scheduler_simple_SMP_Update_priority(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
Thread_Control *_Scheduler_simple_SMP_Ask_for_help(
|
||||
Thread_Control *_Scheduler_simple_SMP_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
|
||||
@@ -1013,7 +1013,7 @@ static inline Thread_Control *_Scheduler_SMP_Update_priority(
|
||||
return needs_help;
|
||||
}
|
||||
|
||||
static inline Thread_Control *_Scheduler_SMP_Ask_for_help(
|
||||
static inline Thread_Control *_Scheduler_SMP_Ask_for_help_X(
|
||||
Scheduler_Context *context,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help,
|
||||
|
||||
@@ -86,7 +86,7 @@ typedef struct {
|
||||
_Scheduler_strong_APA_Update_priority, \
|
||||
_Scheduler_default_Map_priority, \
|
||||
_Scheduler_default_Unmap_priority, \
|
||||
_Scheduler_strong_APA_Ask_for_help, \
|
||||
_Scheduler_strong_APA_Ask_for_help_X, \
|
||||
_Scheduler_strong_APA_Node_initialize, \
|
||||
_Scheduler_default_Node_destroy, \
|
||||
_Scheduler_default_Release_job, \
|
||||
@@ -120,7 +120,7 @@ Thread_Control *_Scheduler_strong_APA_Update_priority(
|
||||
Thread_Control *the_thread
|
||||
);
|
||||
|
||||
Thread_Control *_Scheduler_strong_APA_Ask_for_help(
|
||||
Thread_Control *_Scheduler_strong_APA_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *needs_help,
|
||||
Thread_Control *offers_help
|
||||
|
||||
@@ -38,7 +38,7 @@ RTEMS_INLINE_ROUTINE bool _Scheduler_Set_root_visitor(
|
||||
|
||||
_Resource_Node_set_root( resource_node, &root->Resource_node );
|
||||
|
||||
needs_help_too = ( *scheduler->Operations.ask_for_help )(
|
||||
needs_help_too = ( *scheduler->Operations.ask_for_help_X )(
|
||||
scheduler,
|
||||
offers_help,
|
||||
needs_help
|
||||
@@ -75,6 +75,6 @@ void _Scheduler_Thread_change_resource_root(
|
||||
_Resource_Iterate( &top->Resource_node, _Scheduler_Set_root_visitor, &ctx );
|
||||
|
||||
if ( ctx.needs_help != NULL ) {
|
||||
_Scheduler_Ask_for_help( ctx.needs_help );
|
||||
_Scheduler_Ask_for_help_X( ctx.needs_help );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <rtems/score/scheduler.h>
|
||||
|
||||
Thread_Control *_Scheduler_default_Ask_for_help(
|
||||
Thread_Control *_Scheduler_default_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
|
||||
@@ -525,7 +525,7 @@ Thread_Control *_Scheduler_priority_affinity_SMP_Update_priority(
|
||||
return displaced;
|
||||
}
|
||||
|
||||
Thread_Control *_Scheduler_priority_affinity_SMP_Ask_for_help(
|
||||
Thread_Control *_Scheduler_priority_affinity_SMP_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
@@ -533,7 +533,7 @@ Thread_Control *_Scheduler_priority_affinity_SMP_Ask_for_help(
|
||||
{
|
||||
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
|
||||
|
||||
needs_help = _Scheduler_SMP_Ask_for_help(
|
||||
needs_help = _Scheduler_SMP_Ask_for_help_X(
|
||||
context,
|
||||
offers_help,
|
||||
needs_help,
|
||||
|
||||
@@ -244,7 +244,7 @@ Thread_Control *_Scheduler_priority_SMP_Update_priority(
|
||||
);
|
||||
}
|
||||
|
||||
Thread_Control *_Scheduler_priority_SMP_Ask_for_help(
|
||||
Thread_Control *_Scheduler_priority_SMP_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
@@ -252,7 +252,7 @@ Thread_Control *_Scheduler_priority_SMP_Ask_for_help(
|
||||
{
|
||||
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
|
||||
|
||||
return _Scheduler_SMP_Ask_for_help(
|
||||
return _Scheduler_SMP_Ask_for_help_X(
|
||||
context,
|
||||
offers_help,
|
||||
needs_help,
|
||||
|
||||
@@ -311,7 +311,7 @@ Thread_Control *_Scheduler_simple_SMP_Update_priority(
|
||||
);
|
||||
}
|
||||
|
||||
Thread_Control *_Scheduler_simple_SMP_Ask_for_help(
|
||||
Thread_Control *_Scheduler_simple_SMP_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
@@ -319,7 +319,7 @@ Thread_Control *_Scheduler_simple_SMP_Ask_for_help(
|
||||
{
|
||||
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
|
||||
|
||||
return _Scheduler_SMP_Ask_for_help(
|
||||
return _Scheduler_SMP_Ask_for_help_X(
|
||||
context,
|
||||
offers_help,
|
||||
needs_help,
|
||||
|
||||
@@ -370,7 +370,7 @@ Thread_Control *_Scheduler_strong_APA_Update_priority(
|
||||
);
|
||||
}
|
||||
|
||||
Thread_Control *_Scheduler_strong_APA_Ask_for_help(
|
||||
Thread_Control *_Scheduler_strong_APA_Ask_for_help_X(
|
||||
const Scheduler_Control *scheduler,
|
||||
Thread_Control *offers_help,
|
||||
Thread_Control *needs_help
|
||||
@@ -378,7 +378,7 @@ Thread_Control *_Scheduler_strong_APA_Ask_for_help(
|
||||
{
|
||||
Scheduler_Context *context = _Scheduler_Get_context( scheduler );
|
||||
|
||||
return _Scheduler_SMP_Ask_for_help(
|
||||
return _Scheduler_SMP_Ask_for_help_X(
|
||||
context,
|
||||
offers_help,
|
||||
needs_help,
|
||||
|
||||
Reference in New Issue
Block a user