Ralf Corsepius noted that there was a dead path in _Thread_Initialize.

This commit is contained in:
Joel Sherrill
1998-02-18 19:34:51 +00:00
parent bf4cdb70d5
commit c7744ee03b
2 changed files with 4 additions and 12 deletions

View File

@@ -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;

View File

@@ -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;