source: rtems/cpukit/score/src/rbtreeiterate.c @ fce900b5

5
Last change on this file since fce900b5 was 2d48456, checked in by Sebastian Huber <sebastian.huber@…>, on 08/21/15 at 03:24:17

rbheap: Drop direction from _RBTree_Iterate()

  • Property mode set to 100644
File size: 883 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreRBTree
5 *
6 * @brief _RBTree_Iterate() implementation.
7 */
8
9/*
10 * Copyright (c) 2012 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.org/license/LICENSE.
21 */
22
23#if HAVE_CONFIG_H
24  #include "config.h"
25#endif
26
27#include <rtems/score/rbtreeimpl.h>
28
29void _RBTree_Iterate(
30  const RBTree_Control *rbtree,
31  RBTree_Visitor        visitor,
32  void                 *visitor_arg
33)
34{
35  const RBTree_Node *current = _RBTree_Minimum( rbtree );
36  bool               stop = false;
37
38  while ( !stop && current != NULL ) {
39    stop = ( *visitor )( current, visitor_arg );
40
41    current = _RBTree_Successor( current );
42  }
43}
Note: See TracBrowser for help on using the repository browser.