summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src/pheapgetinfo.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-13 16:48:08 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-05-13 16:48:08 +0000
commit4423e62ac1d7bc7ed4e809ab5ac15540ea61c4c9 (patch)
treec28487317f85b85e38f401a04327f158f11c5776 /cpukit/score/src/pheapgetinfo.c
parent2009-05-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff)
downloadrtems-4423e62ac1d7bc7ed4e809ab5ac15540ea61c4c9.tar.bz2
2009-05-13 Joel Sherrill <joel.sherrill@OARcorp.com>
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.
Diffstat (limited to 'cpukit/score/src/pheapgetinfo.c')
-rw-r--r--cpukit/score/src/pheapgetinfo.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/cpukit/score/src/pheapgetinfo.c b/cpukit/score/src/pheapgetinfo.c
index 26e15d1d5c..1d62fc0673 100644
--- a/cpukit/score/src/pheapgetinfo.c
+++ b/cpukit/score/src/pheapgetinfo.c
@@ -16,14 +16,25 @@
#include <rtems/system.h>
#include <rtems/score/protectedheap.h>
-void _Protected_heap_Get_information(
+bool _Protected_heap_Get_information(
Heap_Control *the_heap,
Heap_Information_block *the_info
)
{
Heap_Get_information_status status;
+ if ( !the_heap )
+ return false;
+
+ if ( !the_info )
+ return false;
+
_RTEMS_Lock_allocator();
status = _Heap_Get_information( the_heap, the_info );
_RTEMS_Unlock_allocator();
+
+ if ( status == HEAP_GET_INFORMATION_SUCCESSFUL )
+ return true;
+
+ return false;
}