diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-10 14:01:55 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-02 10:05:40 +0100 |
commit | 2df4abcee2fd762a9688bef13e152d5b81cc763e (patch) | |
tree | 840277642e69e77c326aec7a4ff6322591cb1467 /cpukit/score/include/rtems/score/schedulersmpimpl.h | |
parent | score: Pass scheduler node to update priority op (diff) | |
download | rtems-2df4abcee2fd762a9688bef13e152d5b81cc763e.tar.bz2 |
score: Pass scheduler node to yield operation
Changed for consistency with other scheduler operations.
Update #2556.
Diffstat (limited to '')
-rw-r--r-- | cpukit/score/include/rtems/score/schedulersmpimpl.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cpukit/score/include/rtems/score/schedulersmpimpl.h b/cpukit/score/include/rtems/score/schedulersmpimpl.h index cec0357f32..6deb160405 100644 --- a/cpukit/score/include/rtems/score/schedulersmpimpl.h +++ b/cpukit/score/include/rtems/score/schedulersmpimpl.h @@ -1084,22 +1084,22 @@ static inline Thread_Control *_Scheduler_SMP_Ask_for_help_X( static inline Thread_Control *_Scheduler_SMP_Yield( Scheduler_Context *context, Thread_Control *thread, + Scheduler_Node *node, Scheduler_SMP_Extract extract_from_ready, Scheduler_SMP_Enqueue enqueue_fifo, Scheduler_SMP_Enqueue_scheduled enqueue_scheduled_fifo ) { - Scheduler_SMP_Node *node = _Scheduler_SMP_Thread_get_node( thread ); Thread_Control *needs_help; - if ( node->state == SCHEDULER_SMP_NODE_SCHEDULED ) { - _Scheduler_SMP_Extract_from_scheduled( &node->Base ); + if ( _Scheduler_SMP_Node_state( node ) == SCHEDULER_SMP_NODE_SCHEDULED ) { + _Scheduler_SMP_Extract_from_scheduled( node ); - needs_help = ( *enqueue_scheduled_fifo )( context, &node->Base ); + needs_help = ( *enqueue_scheduled_fifo )( context, node ); } else { - ( *extract_from_ready )( context, &node->Base ); + ( *extract_from_ready )( context, node ); - needs_help = ( *enqueue_fifo )( context, &node->Base, NULL ); + needs_help = ( *enqueue_fifo )( context, node, NULL ); } return needs_help; |