Changeset 684e243d in rtems


Ignore:
Timestamp:
Aug 6, 2009, 8:39:27 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
e41a748
Parents:
fba809c
Message:

Revert.

Location:
cpukit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libcsupport/Makefile.am

    rfba809c r684e243d  
    114114    $(ERROR_C_FILES) $(ASSOCIATION_C_FILES)
    115115
    116 libcsupport_a_SOURCES += src/end_profile.c
    117 
    118116if UNIX
    119117libcsupport_a_SOURCES += src/unixlibc.c src/unixlibc_io.c src/hosterr.c
  • cpukit/rtems/Makefile.am

    rfba809c r684e243d  
    88AM_CPPFLAGS += -D__RTEMS_INSIDE__
    99
    10 project_lib_LIBRARIES = librtems.a
    1110noinst_LIBRARIES = librtems.a
    1211librtems_a_CPPFLAGS = $(AM_CPPFLAGS)
  • cpukit/sapi/Makefile.am

    rfba809c r684e243d  
    2121AM_CPPFLAGS += -D__RTEMS_INSIDE__
    2222
    23 project_lib_LIBRARIES = libsapi.a
    2423noinst_LIBRARIES = libsapi.a
    2524libsapi_a_SOURCES = src/debug.c src/extension.c src/extensioncreate.c \
  • cpukit/score/Makefile.am

    rfba809c r684e243d  
    7474AM_CPPFLAGS += -D__RTEMS_INSIDE__
    7575
    76 project_lib_LIBRARIES = libscore.a
    7776noinst_LIBRARIES = libscore.a
    7877libscore_a_SOURCES =
  • cpukit/score/src/objectextendinformation.c

    rfba809c r684e243d  
    5454  uint32_t          minimum_index;
    5555  uint32_t          index;
     56  void             *new_object_block;
    5657
    5758  /*
     
    7778  }
    7879
     80  /*
     81   * Allocate the name table, and the objects and if it fails either return or
     82   * generate a fatal error depending on auto-extending being active.
     83   */
     84 
     85  new_object_block =
     86    _Workspace_Allocate(
     87      (information->allocation_size * information->size)
     88    );
     89 
     90  if ( new_object_block == NULL ) {
     91    if ( information->auto_extend ) {
     92      return;
     93    }
     94    else {
     95      _Internal_error_Occurred(
     96        INTERNAL_ERROR_CORE,
     97        true,
     98        INTERNAL_ERROR_WORKSPACE_ALLOCATION
     99      );
     100    }
     101  }
     102 
    79103  /*
    80104   *  If the index_base is the maximum we need to grow the tables.
     
    113137    block_count++;
    114138
    115     maximum = information->maximum + information->allocation_size;
     139    maximum = (uint32_t) information->maximum + information->allocation_size;
    116140
    117141    /*
     
    120144     *  case of 16-bit Ids, this is only 256 object instances.
    121145     */
    122     if ( maximum > OBJECTS_ID_FINAL_INDEX )
     146    if ( maximum > OBJECTS_ID_FINAL_INDEX ) {
     147      if ( !_Workspace_Free( new_object_block ) ) {
     148        _Internal_error_Occurred(
     149          INTERNAL_ERROR_CORE,
     150          true,
     151          INTERNAL_ERROR_WORKSPACE_ALLOCATION
     152        );
     153      }
    123154      return;
     155    }
    124156
    125157    /*
     
    132164    object_blocks = (void**) _Workspace_Allocate( block_size );
    133165
    134     if ( !object_blocks )
     166    if ( !object_blocks ) {
     167      if ( !_Workspace_Free( new_object_block ) ) {
     168        _Internal_error_Occurred(
     169          INTERNAL_ERROR_CORE,
     170          true,
     171          INTERNAL_ERROR_WORKSPACE_ALLOCATION
     172        );
     173      }
    135174      return;
    136 
     175    }
     176   
    137177    /*
    138178     *  Break the block into the various sections.
     
    198238    information->inactive_per_block = inactive_per_block;
    199239    information->local_table = local_table;
    200     information->maximum = maximum;
     240    information->maximum = (Objects_Maximum) maximum;
    201241    information->maximum_id = _Objects_Build_id(
    202242        information->the_api,
     
    215255
    216256  /*
    217    *  Allocate the name table, and the objects
    218    */
    219 
    220   if ( information->auto_extend ) {
    221     information->object_blocks[ block ] =
    222       _Workspace_Allocate(
    223         (information->allocation_size * information->size)
    224       );
    225 
    226     if ( !information->object_blocks[ block ] )
    227       return;
    228   }
    229   else {
    230     information->object_blocks[ block ] =
    231       _Workspace_Allocate_or_fatal_error(
    232         (information->allocation_size * information->size)
    233       );
    234   }
     257   *  Assign the new object block to the object block table.
     258   */
     259
     260  information->object_blocks[ block ] = new_object_block;
    235261
    236262  /*
     
    266292
    267293  information->inactive_per_block[ block ] = information->allocation_size;
    268   information->inactive += information->allocation_size;
     294  information->inactive =
     295    (Objects_Maximum)(information->inactive + information->allocation_size);
    269296}
Note: See TracChangeset for help on using the changeset viewer.