diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-03 10:29:30 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2014-06-04 08:37:06 +0200 |
commit | 8e46738436b18d0f1a9424a95b678ab1596cb092 (patch) | |
tree | 252be226da9107952a87628fd4e5265df603c167 /cpukit/score/src/threadinitialize.c | |
parent | sptests/spsem03: New test (diff) | |
download | rtems-8e46738436b18d0f1a9424a95b678ab1596cb092.tar.bz2 |
score: Replace _Scheduler_Allocate/Free()
Replace _Scheduler_Allocate() with _Scheduler_Node_initialize(). Remove
the return status and thus the node initialization must be always
successful.
Rename _Scheduler_Free() to _Scheduler_Node_destroy().
Diffstat (limited to 'cpukit/score/src/threadinitialize.c')
-rw-r--r-- | cpukit/score/src/threadinitialize.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c index 9c65d73586..2a79549848 100644 --- a/cpukit/score/src/threadinitialize.c +++ b/cpukit/score/src/threadinitialize.c @@ -52,7 +52,7 @@ bool _Thread_Initialize( #endif bool extension_status; size_t i; - bool scheduler_allocated = false; + bool scheduler_node_initialized = false; Per_CPU_Control *cpu = _Per_CPU_Get_by_index( 0 ); #if defined( RTEMS_SMP ) @@ -198,10 +198,8 @@ bool _Thread_Initialize( the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; - scheduler_allocated = _Scheduler_Allocate( scheduler, the_thread ); - if ( !scheduler_allocated ) { - goto failed; - } + _Scheduler_Node_initialize( scheduler, the_thread ); + scheduler_node_initialized = true; _Thread_Set_priority( the_thread, priority ); @@ -246,8 +244,8 @@ bool _Thread_Initialize( failed: - if ( scheduler_allocated ) { - _Scheduler_Free( scheduler, the_thread ); + if ( scheduler_node_initialized ) { + _Scheduler_Node_destroy( scheduler, the_thread ); } _Workspace_Free( the_thread->Start.tls_area ); |