From 317774c99a5ce3765fab3410223cbbbbf28918a8 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 31 Aug 2021 12:42:29 +0200 Subject: score: Remove _Thread_queue_First_locked() The _Thread_queue_First_locked() was only used in one place. Move the code of this inline function to this place. --- cpukit/score/src/threadqfirst.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cpukit/score/src/threadqfirst.c') diff --git a/cpukit/score/src/threadqfirst.c b/cpukit/score/src/threadqfirst.c index 9908523298..8edbc1645f 100644 --- a/cpukit/score/src/threadqfirst.c +++ b/cpukit/score/src/threadqfirst.c @@ -27,11 +27,19 @@ Thread_Control *_Thread_queue_First( const Thread_queue_Operations *operations ) { + Thread_queue_Heads *heads; Thread_Control *the_thread; Thread_queue_Context queue_context; _Thread_queue_Acquire( the_thread_queue, &queue_context ); - the_thread = _Thread_queue_First_locked( the_thread_queue, operations ); + heads = the_thread_queue->Queue.heads; + + if ( heads != NULL ) { + the_thread = ( *operations->first )( heads ); + } else { + the_thread = NULL; + } + _Thread_queue_Release( the_thread_queue, &queue_context ); return the_thread; -- cgit v1.2.3