source: rtems/cpukit/score/src/pheapiterate.c @ a89ae540

4.115
Last change on this file since a89ae540 was a89ae540, checked in by Sebastian Huber <sebastian.huber@…>, on 12/06/11 at 14:23:26

2011-12-06 Sebastian Huber <sebastian.huber@…>

  • score/src/heapiterate.c, score/src/pheapiterate.c: New files.
  • score/Makefile.am: Reflect changes above.
  • score/include/rtems/score/heap.h: Declare _Heap_Iterate() and define Heap_Block_visitor.
  • score/include/rtems/score/protectedheap.h: Declare _Protected_heap_Iterate().
  • score/src/heapgetinfo.c: Use _Heap_Iterate().
  • Property mode set to 100644
File size: 748 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreProtHeap
5 *
6 * @brief _Heap_Iterate() implementation.
7 */
8
9/*
10 * Copyright (c) 2011 embedded brains GmbH.  All rights reserved.
11 *
12 *  embedded brains GmbH
13 *  Obere Lagerstr. 30
14 *  82178 Puchheim
15 *  Germany
16 *  <rtems@embedded-brains.de>
17 *
18 * The license and distribution terms for this file may be
19 * found in the file LICENSE in this distribution or at
20 * http://www.rtems.com/license/LICENSE.
21 *
22 * $Id$
23 */
24
25#if HAVE_CONFIG_H
26  #include "config.h"
27#endif
28
29#include <rtems/score/protectedheap.h>
30
31void _Protected_heap_Iterate(
32  Heap_Control *heap,
33  Heap_Block_visitor visitor,
34  void *visitor_arg
35)
36{
37  _RTEMS_Lock_allocator();
38  _Heap_Iterate( heap, visitor, visitor_arg );
39  _RTEMS_Unlock_allocator();
40}
Note: See TracBrowser for help on using the repository browser.