4.104.115
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 | |
---|
19 | bool _Protected_heap_Walk( |
---|
20 | Heap_Control *the_heap, |
---|
21 | int source, |
---|
22 | bool do_dump |
---|
23 | ) |
---|
24 | { |
---|
25 | bool 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.