diff options
Diffstat (limited to 'cpukit/score/src/threadqfirst.c')
-rw-r--r-- | cpukit/score/src/threadqfirst.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/cpukit/score/src/threadqfirst.c b/cpukit/score/src/threadqfirst.c index f43b9abbd0..553b28bf62 100644 --- a/cpukit/score/src/threadqfirst.c +++ b/cpukit/score/src/threadqfirst.c @@ -19,29 +19,12 @@ #endif #include <rtems/score/threadqimpl.h> -#include <rtems/score/chainimpl.h> -#include <rtems/score/threadimpl.h> Thread_Control *_Thread_queue_First_locked( Thread_queue_Control *the_thread_queue ) { - Thread_Control *thread; - - thread = NULL; - - if ( the_thread_queue->discipline == THREAD_QUEUE_DISCIPLINE_FIFO ) { - if ( !_Chain_Is_empty( &the_thread_queue->Queues.Fifo ) ) - thread = (Thread_Control *) _Chain_First(&the_thread_queue->Queues.Fifo); - } else { /* must be THREAD_QUEUE_DISCIPLINE_PRIORITY */ - RBTree_Node *first; - - first = _RBTree_First( &the_thread_queue->Queues.Priority, RBT_LEFT ); - if ( first ) - thread = THREAD_RBTREE_NODE_TO_THREAD( first ); - } - - return thread; + return ( *the_thread_queue->operations->first )( the_thread_queue ); } Thread_Control *_Thread_queue_First( |