forked from Imagelibrary/rtems
Ralf Corsepius noted that there was a dead path in _Thread_Initialize.
This commit is contained in:
@@ -437,22 +437,18 @@ boolean _Thread_Initialize(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if ( !stack ) {
|
if ( !stack_area ) {
|
||||||
if ( !_Stack_Is_enough( stack_size ) )
|
if ( !_Stack_Is_enough( stack_size ) )
|
||||||
actual_stack_size = STACK_MINIMUM_SIZE;
|
actual_stack_size = STACK_MINIMUM_SIZE;
|
||||||
else
|
else
|
||||||
actual_stack_size = stack_size;
|
actual_stack_size = stack_size;
|
||||||
|
|
||||||
actual_stack_size = _Stack_Adjust_size( actual_stack_size );
|
actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size );
|
||||||
stack = stack_area;
|
|
||||||
|
|
||||||
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
|
|
||||||
|
|
||||||
if ( !actual_stack_size )
|
if ( !actual_stack_size )
|
||||||
return FALSE; /* stack allocation failed */
|
return FALSE; /* stack allocation failed */
|
||||||
|
|
||||||
stack = the_thread->Start.stack;
|
stack = the_thread->Start.stack;
|
||||||
|
|
||||||
the_thread->Start.core_allocated_stack = TRUE;
|
the_thread->Start.core_allocated_stack = TRUE;
|
||||||
} else {
|
} else {
|
||||||
stack = stack_area;
|
stack = stack_area;
|
||||||
|
|||||||
@@ -437,22 +437,18 @@ boolean _Thread_Initialize(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if ( !stack ) {
|
if ( !stack_area ) {
|
||||||
if ( !_Stack_Is_enough( stack_size ) )
|
if ( !_Stack_Is_enough( stack_size ) )
|
||||||
actual_stack_size = STACK_MINIMUM_SIZE;
|
actual_stack_size = STACK_MINIMUM_SIZE;
|
||||||
else
|
else
|
||||||
actual_stack_size = stack_size;
|
actual_stack_size = stack_size;
|
||||||
|
|
||||||
actual_stack_size = _Stack_Adjust_size( actual_stack_size );
|
actual_stack_size = _Thread_Stack_Allocate( the_thread, actual_stack_size );
|
||||||
stack = stack_area;
|
|
||||||
|
|
||||||
actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size );
|
|
||||||
|
|
||||||
if ( !actual_stack_size )
|
if ( !actual_stack_size )
|
||||||
return FALSE; /* stack allocation failed */
|
return FALSE; /* stack allocation failed */
|
||||||
|
|
||||||
stack = the_thread->Start.stack;
|
stack = the_thread->Start.stack;
|
||||||
|
|
||||||
the_thread->Start.core_allocated_stack = TRUE;
|
the_thread->Start.core_allocated_stack = TRUE;
|
||||||
} else {
|
} else {
|
||||||
stack = stack_area;
|
stack = stack_area;
|
||||||
|
|||||||
Reference in New Issue
Block a user