diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2019-12-10 11:13:18 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-02-12 09:08:41 +0100 |
commit | d252e20ab5717afea2ac89543ab4e0d379434bb0 (patch) | |
tree | 3842cffab1df421f283ebd5c6c90577e8469efc1 /cpukit/score/src/threadinitialize.c | |
parent | score: Add _Objects_Allocate_with_extend() (diff) | |
download | rtems-d252e20ab5717afea2ac89543ab4e0d379434bb0.tar.bz2 |
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.
Diffstat (limited to 'cpukit/score/src/threadinitialize.c')
-rw-r--r-- | cpukit/score/src/threadinitialize.c | 11 |
1 files changed, 2 insertions, 9 deletions
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 <rtems/score/tls.h> #include <rtems/score/userextimpl.h> #include <rtems/score/watchdogimpl.h> -#include <rtems/score/wkspace.h> #include <rtems/config.h> 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 ); /* |