From 502629707d8f28e2b1548ebdf03599612d7b6ef5 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 16 May 2012 12:09:56 +0200 Subject: libcsupport: Adjust malloc_walk() prototype The header file provides now also the malloc_walk() prototype. The malloc_walk() prototype reflects now the _Protected_heap_Walk() API. The return status helps to print only in case of an error. --- cpukit/libcsupport/include/rtems/libcsupport.h | 2 +- cpukit/libcsupport/include/rtems/malloc.h | 1 + cpukit/libcsupport/src/malloc_walk.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'cpukit/libcsupport') diff --git a/cpukit/libcsupport/include/rtems/libcsupport.h b/cpukit/libcsupport/include/rtems/libcsupport.h index bbe8e41da8..d2640476df 100644 --- a/cpukit/libcsupport/include/rtems/libcsupport.h +++ b/cpukit/libcsupport/include/rtems/libcsupport.h @@ -34,7 +34,7 @@ void RTEMS_Malloc_Initialize( ); extern void malloc_dump(void); -extern void malloc_walk(size_t source, size_t printf_enabled); +extern bool malloc_walk(int source, bool printf_enabled); void malloc_set_heap_pointer(Heap_Control *new_heap); Heap_Control *malloc_get_heap_pointer( void ); extern void libc_init(void); diff --git a/cpukit/libcsupport/include/rtems/malloc.h b/cpukit/libcsupport/include/rtems/malloc.h index e4d7ee8ce8..7f56a842e5 100644 --- a/cpukit/libcsupport/include/rtems/malloc.h +++ b/cpukit/libcsupport/include/rtems/malloc.h @@ -18,6 +18,7 @@ #include #include +#include /* for malloc_walk() */ #include diff --git a/cpukit/libcsupport/src/malloc_walk.c b/cpukit/libcsupport/src/malloc_walk.c index 209d19bd6f..fa810888c9 100644 --- a/cpukit/libcsupport/src/malloc_walk.c +++ b/cpukit/libcsupport/src/malloc_walk.c @@ -18,9 +18,9 @@ #include -void malloc_walk(size_t source, size_t printf_enabled) +bool malloc_walk(int source, bool printf_enabled) { - _Protected_heap_Walk( RTEMS_Malloc_Heap, (int) source, printf_enabled ); + return _Protected_heap_Walk( RTEMS_Malloc_Heap, source, printf_enabled ); } #endif -- cgit v1.2.3