[PATCH 03/12] score: _Scheduler_priority_Ready_queue_first()
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Aug 13 13:42:48 UTC 2013
Remove superfluous check since a ready thread must exist.
---
.../include/rtems/score/schedulerpriorityimpl.h | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
index 0fbece6..5983c74 100644
--- a/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
+++ b/cpukit/score/include/rtems/score/schedulerpriorityimpl.h
@@ -148,10 +148,7 @@ RTEMS_INLINE_ROUTINE Thread_Control *_Scheduler_priority_Ready_queue_first(
{
Priority_Control index = _Priority_bit_map_Get_highest();
- if ( !_Chain_Is_empty( &the_ready_queue[ index ] ) )
- return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
-
- return NULL;
+ return (Thread_Control *) _Chain_First( &the_ready_queue[ index ] );
}
/**
--
1.7.7
More information about the devel
mailing list