[rtems commit] score: Simplify SMP scheduler support
Sebastian Huber
sebh at rtems.org
Fri May 16 11:18:39 UTC 2014
Module: rtems
Branch: master
Commit: 1ac0b083f84e4760331456e02928bfea97038e07
Changeset: http://git.rtems.org/rtems/commit/?id=1ac0b083f84e4760331456e02928bfea97038e07
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Fri May 16 10:55:01 2014 +0200
score: Simplify SMP scheduler support
---
.../score/include/rtems/score/schedulersmpimpl.h | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/cpukit/score/include/rtems/score/schedulersmpimpl.h b/cpukit/score/include/rtems/score/schedulersmpimpl.h
index c63b464..58ad844 100644
--- a/cpukit/score/include/rtems/score/schedulersmpimpl.h
+++ b/cpukit/score/include/rtems/score/schedulersmpimpl.h
@@ -460,9 +460,6 @@ static inline void _Scheduler_SMP_Enqueue_ordered(
_Assert( lowest_scheduled != NULL);
- /*
- * NOTE: Do not exchange parameters to do the negation of the order check.
- */
if ( ( *order )( &thread->Object.Node, &lowest_scheduled->Object.Node ) ) {
Scheduler_SMP_Node *lowest_scheduled_node =
_Scheduler_SMP_Node_get( lowest_scheduled );
@@ -513,16 +510,14 @@ static inline void _Scheduler_SMP_Enqueue_scheduled_ordered(
/*
* The thread has been extracted from the scheduled chain. We have to place
* it now on the scheduled or ready set.
- *
- * NOTE: Do not exchange parameters to do the negation of the order check.
*/
- if ( !( *order )( &thread->Object.Node, &highest_ready->Object.Node ) ) {
+ if ( ( *order )( &thread->Object.Node, &highest_ready->Object.Node ) ) {
+ ( *insert_scheduled )( &self->Base, thread );
+ } else {
_Scheduler_SMP_Node_change_state( node, SCHEDULER_SMP_NODE_READY );
_Scheduler_SMP_Allocate_processor( self, highest_ready, thread );
( *insert_ready )( &self->Base, thread );
( *move_from_ready_to_scheduled )( &self->Base, highest_ready );
- } else {
- ( *insert_scheduled )( &self->Base, thread );
}
}
More information about the vc
mailing list