diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-13 16:48:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2009-05-13 16:48:08 +0000 |
commit | 4423e62ac1d7bc7ed4e809ab5ac15540ea61c4c9 (patch) | |
tree | c28487317f85b85e38f401a04327f158f11c5776 /cpukit/score/src/pheapgetinfo.c | |
parent | 2009-05-11 Joel Sherrill <joel.sherrill@oarcorp.com> (diff) | |
download | rtems-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.c | 13 |
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; } |