4.104.115
Last change
on this file since da42259 was
4423e62a,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/13/09 at 16:48:08
|
2009-05-13 Joel Sherrill <joel.sherrill@…>
PR 1411/cpukit
- rtems/src/workspace.c, score/include/rtems/score/protectedheap.h,
score/src/pheapgetfreeinfo.c, score/src/pheapgetinfo.c: Improve
workspace wrapper methods.
|
-
Property mode set to
100644
|
File size:
809 bytes
|
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_Get_information( |
---|
20 | Heap_Control *the_heap, |
---|
21 | Heap_Information_block *the_info |
---|
22 | ) |
---|
23 | { |
---|
24 | Heap_Get_information_status status; |
---|
25 | |
---|
26 | if ( !the_heap ) |
---|
27 | return false; |
---|
28 | |
---|
29 | if ( !the_info ) |
---|
30 | return false; |
---|
31 | |
---|
32 | _RTEMS_Lock_allocator(); |
---|
33 | status = _Heap_Get_information( the_heap, the_info ); |
---|
34 | _RTEMS_Unlock_allocator(); |
---|
35 | |
---|
36 | if ( status == HEAP_GET_INFORMATION_SUCCESSFUL ) |
---|
37 | return true; |
---|
38 | |
---|
39 | return false; |
---|
40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.