source: rtems/cpukit/score/src/pheapwalk.c @ 22ce0881

4.104.114.95
Last change on this file since 22ce0881 was 5ae327b, checked in by Joel Sherrill <joel.sherrill@…>, on 09/07/07 at 19:39:25

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.
  • Property mode set to 100644
File size: 1.0 KB
Line 
1/**
2 *  COPYRIGHT (c) 1989-2007.
3 *  On-Line Applications Research Corporation (OAR).
4 *
5 *  The license and distribution terms for this file may be
6 *  found in the file LICENSE in this distribution or at
7 *  http://www.rtems.com/license/LICENSE.
8 *
9 *  $Id$
10 */
11
12#if HAVE_CONFIG_H
13#include "config.h"
14#endif
15
16#include <rtems/system.h>
17#include <rtems/score/protectedheap.h>
18
19boolean _Protected_heap_Walk(
20  Heap_Control *the_heap,
21  int           source,
22  boolean       do_dump
23)
24{
25  boolean status;
26
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 {
39    status = _Heap_Walk( the_heap, source, do_dump );
40  }
41  return status;
42}
Note: See TracBrowser for help on using the repository browser.