summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/schedulerimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-09-30 14:38:04 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-11-02 10:05:40 +0100
commit501043a18bae037ca7195ce6989d3ffa8cc72660 (patch)
tree57e5051298373efcf465be0d0675a0efce50c80f /cpukit/score/include/rtems/score/schedulerimpl.h
parentscore: Rename scheduler ask for help stuff (diff)
downloadrtems-501043a18bae037ca7195ce6989d3ffa8cc72660.tar.bz2
score: Pass scheduler node to update priority op
This enables to call this scheduler operation for all scheduler nodes available to a thread. Update #2556.
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulerimpl.h')
-rw-r--r--cpukit/score/include/rtems/score/schedulerimpl.h28
1 files changed, 16 insertions, 12 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerimpl.h b/cpukit/score/include/rtems/score/schedulerimpl.h
index e44dd4fbbb..211b7a7fd9 100644
--- a/cpukit/score/include/rtems/score/schedulerimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerimpl.h
@@ -136,6 +136,17 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Release_critical(
_ISR_lock_Release( &_Scheduler_Lock, lock_context );
}
+RTEMS_INLINE_ROUTINE Scheduler_Node *_Scheduler_Thread_get_node(
+ const Thread_Control *the_thread
+)
+{
+#if defined(RTEMS_SMP)
+ return the_thread->Scheduler.node;
+#else
+ return the_thread->Scheduler.nodes;
+#endif
+}
+
/**
* The preferred method to add a new scheduler is to define the jump table
* entries and add a case to the _Scheduler_Initialize routine.
@@ -381,7 +392,11 @@ RTEMS_INLINE_ROUTINE void _Scheduler_Update_priority( Thread_Control *the_thread
#if defined(RTEMS_SMP)
needs_help =
#endif
- ( *own_scheduler->Operations.update_priority )( own_scheduler, the_thread );
+ ( *own_scheduler->Operations.update_priority )(
+ own_scheduler,
+ the_thread,
+ _Thread_Scheduler_get_home_node( the_thread )
+ );
#if defined(RTEMS_SMP)
_Scheduler_Ask_for_help_if_necessary( needs_help );
@@ -768,17 +783,6 @@ RTEMS_INLINE_ROUTINE uint32_t _Scheduler_Get_index(
return (uint32_t) (scheduler - &_Scheduler_Table[ 0 ]);
}
-RTEMS_INLINE_ROUTINE Scheduler_Node *_Scheduler_Thread_get_node(
- const Thread_Control *the_thread
-)
-{
-#if defined(RTEMS_SMP)
- return the_thread->Scheduler.node;
-#else
- return the_thread->Scheduler.nodes;
-#endif
-}
-
RTEMS_INLINE_ROUTINE void _Scheduler_Thread_set_priority(
Thread_Control *the_thread,
Priority_Control new_priority,