diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-07-10 12:49:43 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-07-10 15:29:57 +0200 |
commit | 333f9426f6d4239e33f39da0b2217c58f6fa9046 (patch) | |
tree | 64a6b1302bce7449c2345ab5389a23622982c6e8 /cpukit/score/include/rtems | |
parent | FreeBSD standard shell does not support substring expansion. (diff) | |
download | rtems-333f9426f6d4239e33f39da0b2217c58f6fa9046.tar.bz2 |
score: Fix assertions
Diffstat (limited to 'cpukit/score/include/rtems')
-rw-r--r-- | cpukit/score/include/rtems/score/schedulerpriorityimpl.h | 5 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/schedulersmpimpl.h | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h index a1aa779721..ab5abdc65f 100644 --- a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h +++ b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h @@ -161,8 +161,11 @@ RTEMS_INLINE_ROUTINE Chain_Node *_Scheduler_priority_Ready_queue_first( ) { Priority_Control index = _Priority_bit_map_Get_highest( bit_map ); + Chain_Node *first = _Chain_First( &ready_queues[ index ] ); - return _Chain_First( &ready_queues[ index ] ); + _Assert( first != _Chain_Tail( &ready_queues[ index ] ) ); + + return first; } /** diff --git a/cpukit/score/include/rtems/score/schedulersmpimpl.h b/cpukit/score/include/rtems/score/schedulersmpimpl.h index 3cf7861d3b..a4890df4d0 100644 --- a/cpukit/score/include/rtems/score/schedulersmpimpl.h +++ b/cpukit/score/include/rtems/score/schedulersmpimpl.h @@ -678,8 +678,6 @@ static inline Thread_Control *_Scheduler_SMP_Enqueue_scheduled_ordered( while ( true ) { Scheduler_Node *highest_ready = ( *get_highest_ready )( context, node ); - _Assert( highest_ready != NULL ); - /* * The node has been extracted from the scheduled chain. We have to place * it now on the scheduled or ready set. @@ -761,8 +759,6 @@ static inline void _Scheduler_SMP_Schedule_highest_ready( while ( true ) { Scheduler_Node *highest_ready = ( *get_highest_ready )( context, victim ); - _Assert( highest_ready != NULL ); - if ( _Scheduler_Try_to_schedule_node( context, |