Changeset b4b062f in rtems


Ignore:
Timestamp:
Apr 8, 2016, 5:50:42 AM (3 years ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
acf7cf3b
Parents:
1142f55
git-author:
Sebastian Huber <sebastian.huber@…> (04/08/16 05:50:42)
git-committer:
Sebastian Huber <sebastian.huber@…> (04/12/16 05:36:19)
Message:

rtems: Delete Region_Control::number_of_used_blocks

Use Heap_Statistics::used_blocks instead.

Location:
cpukit
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/monitor/mon-region.c

    r1142f55 rb4b062f  
    2020{
    2121    const Region_Control *rtems_region = (const Region_Control *) region_void;
     22    const Heap_Control *heap = &rtems_region->Memory;
    2223
    2324    canonical_region->attribute = rtems_region->attribute_set;
     
    2627    canonical_region->page_size = rtems_region->page_size;
    2728    canonical_region->max_seg_size = rtems_region->maximum_segment_size;
    28     canonical_region->used_blocks = rtems_region->number_of_used_blocks;
     29    canonical_region->used_blocks = heap->stats.used_blocks;
    2930}
    3031
  • cpukit/rtems/include/rtems/rtems/region.h

    r1142f55 rb4b062f  
    6666  uintptr_t             maximum_segment_size;  /* in bytes               */
    6767  rtems_attribute       attribute_set;
    68   uint32_t              number_of_used_blocks; /* blocks allocated       */
    6968  Heap_Control          Memory;
    7069}  Region_Control;
  • cpukit/rtems/src/regioncreate.c

    r1142f55 rb4b062f  
    8888        return_status = RTEMS_INVALID_SIZE;
    8989      } else {
    90         the_region->starting_address      = starting_address;
    91         the_region->length                = length;
    92         the_region->page_size             = page_size;
    93         the_region->attribute_set         = attribute_set;
    94         the_region->number_of_used_blocks = 0;
     90        the_region->starting_address = starting_address;
     91        the_region->length           = length;
     92        the_region->page_size        = page_size;
     93        the_region->attribute_set    = attribute_set;
    9594
    9695        _Objects_Open(
  • cpukit/rtems/src/regiondelete.c

    r1142f55 rb4b062f  
    3737  }
    3838
    39   if ( the_region->number_of_used_blocks != 0 ) {
     39  _Heap_Protection_free_all_delayed_blocks( &the_region->Memory );
     40
     41  if ( the_region->Memory.stats.used_blocks != 0 ) {
    4042    status = RTEMS_RESOURCE_IN_USE;
    4143  } else {
  • cpukit/rtems/src/regiongetsegment.c

    r1142f55 rb4b062f  
    5959
    6060    if ( the_segment != NULL ) {
    61       the_region->number_of_used_blocks += 1;
    6261      *segment = the_segment;
    6362      status = RTEMS_SUCCESSFUL;
  • cpukit/rtems/src/regionprocessqueue.c

    r1142f55 rb4b062f  
    6565
    6666    *(void **)the_thread->Wait.return_argument = the_segment;
    67     the_region->number_of_used_blocks += 1;
    6867    _Thread_queue_Extract( the_thread );
    6968    the_thread->Wait.return_code = RTEMS_SUCCESSFUL;
  • cpukit/rtems/src/regionreturnsegment.c

    r1142f55 rb4b062f  
    3535
    3636  if ( _Region_Free_segment( the_region, segment ) ) {
    37     the_region->number_of_used_blocks -= 1;
    38 
    3937    /* Unlocks allocator */
    4038    _Region_Process_queue( the_region );
Note: See TracChangeset for help on using the changeset viewer.