Changeset c1d924d in rtems


Ignore:
Timestamp:
Jun 18, 2009, 4:17:03 PM (11 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 5, master
Children:
cbbc55ef
Parents:
18105b4
Message:

2009-06-18 Joel Sherrill <joel.sherrill@…>

  • rtems/src/regionextend.c: Restructure to eliminate dead code being generated.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r18105b4 rc1d924d  
     12009-06-18      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * rtems/src/regionextend.c: Restructure to eliminate dead code being
     4        generated.
     5
    162009-06-18      Chris Johns <chrisj@rtems.org>
    27
  • cpukit/rtems/src/regionextend.c

    r18105b4 rc1d924d  
    11/*
    2  *  Region Manager
     2 *  Region Manager - Extend (add memory to) a Region
    33 *
    4  *
    5  *  COPYRIGHT (c) 1989-2007.
     4 *  COPYRIGHT (c) 1989-2009.
    65 *  On-Line Applications Research Corporation (OAR).
    76 *
     
    5352  Heap_Extend_status  heap_status;
    5453  Objects_Locations   location;
    55   rtems_status_code   return_status = RTEMS_INTERNAL_ERROR;
     54  rtems_status_code   return_status;
    5655  Region_Control     *the_region;
    5756
     
    7372        );
    7473
    75         switch ( heap_status ) {
    76           case HEAP_EXTEND_SUCCESSFUL:
    77             the_region->length                += amount_extended;
    78             the_region->maximum_segment_size  += amount_extended;
    79             return_status = RTEMS_SUCCESSFUL;
    80             break;
    81           case HEAP_EXTEND_ERROR:
    82             return_status = RTEMS_INVALID_ADDRESS;
    83             break;
    84           case HEAP_EXTEND_NOT_IMPLEMENTED:
    85             return_status = RTEMS_NOT_IMPLEMENTED;
    86             break;
     74        if ( heap_status == HEAP_EXTEND_SUCCESSFUL ) {
     75          the_region->length                += amount_extended;
     76          the_region->maximum_segment_size  += amount_extended;
     77          return_status = RTEMS_SUCCESSFUL;
     78        } else if ( heap_status == HEAP_EXTEND_ERROR ) {
     79          return_status = RTEMS_INVALID_ADDRESS;
     80        } else if ( heap_status ==  HEAP_EXTEND_NOT_IMPLEMENTED ) {
     81          return_status = RTEMS_NOT_IMPLEMENTED;
    8782        }
    8883        break;
     
    9489
    9590      case OBJECTS_ERROR:
     91      default:
    9692        return_status = RTEMS_INVALID_ID;
    9793        break;
Note: See TracChangeset for help on using the changeset viewer.