diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-10-10 11:46:07 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-11-02 10:05:43 +0100 |
commit | 6a82f1ae8c1cd3d24b4ad6dc78431ffffb214151 (patch) | |
tree | b993ecd480c257431c658c86d126cf1111d7abf6 /cpukit/score/include/rtems/score/schedulersmpimpl.h | |
parent | score: Add new SMP scheduler helping protocol (diff) | |
download | rtems-6a82f1ae8c1cd3d24b4ad6dc78431ffffb214151.tar.bz2 |
score: Yield support for new SMP helping protocol
Update #2556.
Diffstat (limited to 'cpukit/score/include/rtems/score/schedulersmpimpl.h')
-rw-r--r-- | cpukit/score/include/rtems/score/schedulersmpimpl.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/schedulersmpimpl.h b/cpukit/score/include/rtems/score/schedulersmpimpl.h index 8f9bf2f363..0e7d3585e1 100644 --- a/cpukit/score/include/rtems/score/schedulersmpimpl.h +++ b/cpukit/score/include/rtems/score/schedulersmpimpl.h @@ -1138,16 +1138,21 @@ static inline Thread_Control *_Scheduler_SMP_Yield( Scheduler_SMP_Enqueue_scheduled enqueue_scheduled_fifo ) { - Thread_Control *needs_help; + Thread_Control *needs_help; + Scheduler_SMP_Node_state node_state; + + node_state = _Scheduler_SMP_Node_state( node ); - if ( _Scheduler_SMP_Node_state( node ) == SCHEDULER_SMP_NODE_SCHEDULED ) { + if ( node_state == SCHEDULER_SMP_NODE_SCHEDULED ) { _Scheduler_SMP_Extract_from_scheduled( node ); needs_help = ( *enqueue_scheduled_fifo )( context, node ); - } else { + } else if ( node_state == SCHEDULER_SMP_NODE_READY ) { ( *extract_from_ready )( context, node ); needs_help = ( *enqueue_fifo )( context, node, NULL ); + } else { + needs_help = thread; } return needs_help; |