Changeset 5ae327b in rtems


Ignore:
Timestamp:
Sep 7, 2007, 7:39:25 PM (12 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
1f49f77
Parents:
e422da8
Message:

2007-09-07 Joel Sherrill <joel.sherrill@…>

  • score/src/heap.c: Style.
  • score/src/heapwalk.c: Add more information to prints.
  • score/src/pheapwalk.c: Do not lock allocator mutex if dispatching is disabled.
Location:
cpukit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    re422da8 r5ae327b  
     12007-09-07      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * score/src/heap.c: Style.
     4        * score/src/heapwalk.c: Add more information to prints.
     5        * score/src/pheapwalk.c: Do not lock allocator mutex if dispatching
     6        is disabled.
     7
    182007-09-06      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • cpukit/score/src/heap.c

    re422da8 r5ae327b  
    118118)
    119119{
    120   Heap_Block *the_block;
    121   uint32_t  the_size;
    122   _H_uptr_t   start;
    123   _H_uptr_t   aligned_start;
    124   uint32_t  overhead;
     120  Heap_Block            *the_block;
     121  uint32_t               the_size;
     122  _H_uptr_t              start;
     123  _H_uptr_t              aligned_start;
     124  uint32_t               overhead;
    125125  Heap_Statistics *const stats = &the_heap->stats;
    126126
    127   if(page_size == 0)
     127  if (page_size == 0)
    128128    page_size = CPU_ALIGNMENT;
    129129  else
  • cpukit/score/src/heapwalk.c

    re422da8 r5ae327b  
    100100  }
    101101
    102   while ( the_block < end ) {
     102  while ( the_block != end ) {
    103103    uint32_t const the_size = _Heap_Block_size(the_block);
    104104    Heap_Block *const next_block = _Heap_Block_at(the_block, the_size);
     
    166166
    167167  if (the_block != end) {
    168     printk("PASS: %d !last block address isn't equal to 'final'\n", source);
     168    printk("PASS: %d !last block address isn't equal to 'final' %p %p\n",
     169      source, the_block, end);
    169170    error = 1;
    170171  }
    171172
    172173  if (_Heap_Block_size(the_block) != the_heap->page_size) {
    173     printk("PASS: %d !last block's size isn't page_size\n", source);
     174    printk("PASS: %d !last block's size isn't page_size (%d != %d)\n", source,
     175           _Heap_Block_size(the_block), the_heap->page_size);
    174176    error = 1;
    175177  }
  • cpukit/score/src/pheapwalk.c

    re422da8 r5ae327b  
    2525  boolean status;
    2626
    27   _RTEMS_Lock_allocator();
     27  /*
     28   * If we are called from within a dispatching critical section,
     29   * then it is forbidden to lock a mutex.  But since we are inside
     30   * a critical section, it should be safe to walk it unlocked.
     31   *
     32   * NOTE: Dispatching is also disabled during initialization.
     33   */
     34  if ( !_Thread_Dispatch_disable_level ) {
     35    _RTEMS_Lock_allocator();
     36      status = _Heap_Walk( the_heap, source, do_dump );
     37    _RTEMS_Unlock_allocator();
     38  } else {
    2839    status = _Heap_Walk( the_heap, source, do_dump );
    29   _RTEMS_Unlock_allocator();
     40  }
    3041  return status;
    3142}
Note: See TracChangeset for help on using the changeset viewer.