diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-06-07 09:35:01 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-06-07 09:35:01 +0000 |
commit | b2a0214d4395787eca8e74375d283bf26c9ca4a1 (patch) | |
tree | eb91086d7da6342ea88ad774939bb90afcfd3e4f /cpukit/rtems | |
parent | 2010-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-b2a0214d4395787eca8e74375d283bf26c9ca4a1.tar.bz2 |
2010-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
* score/include/rtems/score/heap.h: Declare
_Heap_Get_first_and_last_block(). Removed Heap_Extend_status.
Changed return type of _Heap_Extend() to bool.
* score/inline/rtems/score/heap.inl: Define
_Heap_Set_last_block_size().
* score/src/heap.c: Define and use _Heap_Get_first_and_last_block().
* score/src/heapgetinfo.c: Removed assert statements. Do not count
the last block. This ensures that all size values are an integral
multiple of the page size which is consistent with the other
statistics.
* score/src/heapextend.c: Implemented support for scattered heap
areas.
* score/src/heapwalk.c: Dump also last block. Changes for new first
and last block values.
* ./score/src/pheapextend.c, rtems/src/regionextend.c: Update for
_Heap_Extend() changes.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r-- | cpukit/rtems/src/regionextend.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/cpukit/rtems/src/regionextend.c b/cpukit/rtems/src/regionextend.c index 0531381328..f4b6c93c2d 100644 --- a/cpukit/rtems/src/regionextend.c +++ b/cpukit/rtems/src/regionextend.c @@ -49,7 +49,7 @@ rtems_status_code rtems_region_extend( ) { uintptr_t amount_extended; - Heap_Extend_status heap_status; + bool extend_ok; Objects_Locations location; rtems_status_code return_status; Region_Control *the_region; @@ -64,21 +64,19 @@ rtems_status_code rtems_region_extend( case OBJECTS_LOCAL: - heap_status = _Heap_Extend( + extend_ok = _Heap_Extend( &the_region->Memory, starting_address, length, &amount_extended ); - if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) { + if ( extend_ok ) { the_region->length += amount_extended; the_region->maximum_segment_size += amount_extended; return_status = RTEMS_SUCCESSFUL; - } else if ( heap_status == HEAP_EXTEND_ERROR ) { + } else { return_status = RTEMS_INVALID_ADDRESS; - } else /* if ( heap_status == HEAP_EXTEND_NOT_IMPLEMENTED ) */ { - return_status = RTEMS_NOT_IMPLEMENTED; } break; |