mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 23:23:13 +00:00
2009-06-18 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/src/regionextend.c: Restructure to eliminate dead code being generated.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-06-18 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
|
* rtems/src/regionextend.c: Restructure to eliminate dead code being
|
||||||
|
generated.
|
||||||
|
|
||||||
2009-06-18 Chris Johns <chrisj@rtems.org>
|
2009-06-18 Chris Johns <chrisj@rtems.org>
|
||||||
|
|
||||||
* telnetd/des.c: Split the des_f struct into smaller parts so
|
* telnetd/des.c: Split the des_f struct into smaller parts so
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Region Manager
|
* Region Manager - Extend (add memory to) a Region
|
||||||
*
|
*
|
||||||
*
|
* COPYRIGHT (c) 1989-2009.
|
||||||
* COPYRIGHT (c) 1989-2007.
|
|
||||||
* On-Line Applications Research Corporation (OAR).
|
* On-Line Applications Research Corporation (OAR).
|
||||||
*
|
*
|
||||||
* The license and distribution terms for this file may be
|
* The license and distribution terms for this file may be
|
||||||
@@ -52,7 +51,7 @@ rtems_status_code rtems_region_extend(
|
|||||||
intptr_t amount_extended;
|
intptr_t amount_extended;
|
||||||
Heap_Extend_status heap_status;
|
Heap_Extend_status heap_status;
|
||||||
Objects_Locations location;
|
Objects_Locations location;
|
||||||
rtems_status_code return_status = RTEMS_INTERNAL_ERROR;
|
rtems_status_code return_status;
|
||||||
Region_Control *the_region;
|
Region_Control *the_region;
|
||||||
|
|
||||||
if ( !starting_address )
|
if ( !starting_address )
|
||||||
@@ -72,18 +71,14 @@ rtems_status_code rtems_region_extend(
|
|||||||
&amount_extended
|
&amount_extended
|
||||||
);
|
);
|
||||||
|
|
||||||
switch ( heap_status ) {
|
if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
|
||||||
case HEAP_EXTEND_SUCCESSFUL:
|
|
||||||
the_region->length += amount_extended;
|
the_region->length += amount_extended;
|
||||||
the_region->maximum_segment_size += amount_extended;
|
the_region->maximum_segment_size += amount_extended;
|
||||||
return_status = RTEMS_SUCCESSFUL;
|
return_status = RTEMS_SUCCESSFUL;
|
||||||
break;
|
} else if ( heap_status == HEAP_EXTEND_ERROR ) {
|
||||||
case HEAP_EXTEND_ERROR:
|
|
||||||
return_status = RTEMS_INVALID_ADDRESS;
|
return_status = RTEMS_INVALID_ADDRESS;
|
||||||
break;
|
} else if ( heap_status == HEAP_EXTEND_NOT_IMPLEMENTED ) {
|
||||||
case HEAP_EXTEND_NOT_IMPLEMENTED:
|
|
||||||
return_status = RTEMS_NOT_IMPLEMENTED;
|
return_status = RTEMS_NOT_IMPLEMENTED;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -93,6 +88,7 @@ rtems_status_code rtems_region_extend(
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
case OBJECTS_ERROR:
|
case OBJECTS_ERROR:
|
||||||
|
default:
|
||||||
return_status = RTEMS_INVALID_ID;
|
return_status = RTEMS_INVALID_ID;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user