[rtems commit] smp: Fix scheduler helping protocol assertions
Sebastian Huber
sebh at rtems.org
Thu Nov 27 09:37:01 UTC 2014
Module: rtems
Branch: master
Commit: 79569ae6558c2c7ad601df429142ca73cbf5a691
Changeset: http://git.rtems.org/rtems/commit/?id=79569ae6558c2c7ad601df429142ca73cbf5a691
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Nov 26 10:00:13 2014 +0100
smp: Fix scheduler helping protocol assertions
---
cpukit/score/include/rtems/score/schedulersmpimpl.h | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/cpukit/score/include/rtems/score/schedulersmpimpl.h b/cpukit/score/include/rtems/score/schedulersmpimpl.h
index 0ddfce0..e41c737 100644
--- a/cpukit/score/include/rtems/score/schedulersmpimpl.h
+++ b/cpukit/score/include/rtems/score/schedulersmpimpl.h
@@ -842,19 +842,21 @@ static inline Thread_Control *_Scheduler_SMP_Unblock(
Thread_Control *needs_help;
if ( unblock ) {
- if ( node->state != SCHEDULER_SMP_NODE_READY ) {
+ if ( node->state == SCHEDULER_SMP_NODE_BLOCKED ) {
_Scheduler_SMP_Node_change_state( node, SCHEDULER_SMP_NODE_READY );
needs_help = ( *enqueue_fifo )( context, &node->Base, thread );
} else {
_Assert( node->state == SCHEDULER_SMP_NODE_READY );
+ _Assert(
+ node->Base.help_state == SCHEDULER_HELP_ACTIVE_OWNER
+ || node->Base.help_state == SCHEDULER_HELP_ACTIVE_RIVAL
+ );
_Assert( node->Base.idle == NULL );
if ( node->Base.accepts_help == thread ) {
- _Assert( node->Base.help_state == SCHEDULER_HELP_ACTIVE_OWNER );
needs_help = thread;
} else {
- _Assert( node->Base.help_state == SCHEDULER_HELP_ACTIVE_RIVAL );
needs_help = NULL;
}
}
More information about the vc
mailing list