diff options
Diffstat (limited to 'cpukit/score/src/pheapiterate.c')
-rw-r--r-- | cpukit/score/src/pheapiterate.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/cpukit/score/src/pheapiterate.c b/cpukit/score/src/pheapiterate.c new file mode 100644 index 0000000000..ec98f75ad2 --- /dev/null +++ b/cpukit/score/src/pheapiterate.c @@ -0,0 +1,40 @@ +/** + * @file + * + * @ingroup ScoreProtHeap + * + * @brief _Heap_Iterate() implementation. + */ + +/* + * Copyright (c) 2011 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Obere Lagerstr. 30 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#if HAVE_CONFIG_H + #include "config.h" +#endif + +#include <rtems/score/protectedheap.h> + +void _Protected_heap_Iterate( + Heap_Control *heap, + Heap_Block_visitor visitor, + void *visitor_arg +) +{ + _RTEMS_Lock_allocator(); + _Heap_Iterate( heap, visitor, visitor_arg ); + _RTEMS_Unlock_allocator(); +} |