summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-12 09:54:58 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-10-12 10:37:23 +0200
commit2ba0c0358d4256ae1b176ac05cbaaaf3580304f0 (patch)
tree7a524dbc74e3d2fa3f5d84d8e22c2471ceef0168
parentsmpschedaffinity05: Fix configuration (diff)
downloadrtems-2ba0c0358d4256ae1b176ac05cbaaaf3580304f0.tar.bz2
score: Simplify check for migrations
-rw-r--r--cpukit/score/src/schedulerpriorityaffinitysmp.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/cpukit/score/src/schedulerpriorityaffinitysmp.c b/cpukit/score/src/schedulerpriorityaffinitysmp.c
index e171d5e5c7..9565af28df 100644
--- a/cpukit/score/src/schedulerpriorityaffinitysmp.c
+++ b/cpukit/score/src/schedulerpriorityaffinitysmp.c
@@ -345,31 +345,15 @@ static void _Scheduler_priority_affinity_SMP_Check_for_migrations(
* in the ready set, then we need to swap them out.
*/
- _Scheduler_SMP_Node_change_state(
- _Scheduler_SMP_Node_downcast( lowest_scheduled ),
- SCHEDULER_SMP_NODE_READY
- );
- _Scheduler_Thread_change_state(
- _Scheduler_Node_get_user( lowest_scheduled ),
- THREAD_SCHEDULER_READY
- );
-
- _Scheduler_SMP_Allocate_processor(
+ _Scheduler_priority_SMP_Extract_from_ready( context, highest_ready );
+ _Scheduler_SMP_Enqueue_to_scheduled(
context,
highest_ready,
lowest_scheduled,
+ _Scheduler_SMP_Insert_scheduled_fifo,
+ _Scheduler_priority_SMP_Move_from_scheduled_to_ready,
_Scheduler_SMP_Allocate_processor_exact
);
-
- _Scheduler_priority_SMP_Move_from_ready_to_scheduled(
- context,
- highest_ready
- );
-
- _Scheduler_priority_SMP_Move_from_scheduled_to_ready(
- context,
- lowest_scheduled
- );
}
}