From d252e20ab5717afea2ac89543ab4e0d379434bb0 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 10 Dec 2019 11:13:18 +0100 Subject: score: Simplify _Thread_Initialize() Allocate new thread queue heads during objects information extend. This removes an error case and the last dependency on the workspace in _Thread_Initialize(). Update #3835. --- cpukit/score/src/threadinitialize.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'cpukit/score/src/threadinitialize.c') diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 6b9b6bef21..4dc6d51d72 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -24,7 +24,6 @@ #include #include #include -#include #include bool _Thread_Initialize( @@ -115,15 +114,9 @@ bool _Thread_Initialize( /* * Get thread queue heads */ - the_thread->Wait.spare_heads = _Freechain_Get( - &information->Thread_queue_heads.Free, - _Workspace_Allocate, - _Objects_Extend_size( &information->Objects ), - _Thread_queue_Heads_size + the_thread->Wait.spare_heads = _Freechain_Pop( + &information->Thread_queue_heads.Free ); - if ( the_thread->Wait.spare_heads == NULL ) { - goto failed; - } _Thread_queue_Heads_initialize( the_thread->Wait.spare_heads ); /* -- cgit v1.2.3