source: rtems/cpukit/score/src/rbtreeiterate.c @ 93fb3cb0

4.115
Last change on this file since 93fb3cb0 was 93fb3cb0, checked in by Sebastian Huber <sebastian.huber@…>, on 07/23/13 at 08:38:11

score: Create rbtree implementation header

Move implementation specific parts of rbtree.h and rbtree.inl into new
header file rbtreeimpl.h. The rbtree.h contains now only the
application visible API.

  • Property mode set to 100644
File size: 980 bytes
Line 
1/**
2 * @file
3 *
4 * @ingroup ScoreRBTree
5 *
6 * @brief _RBTree_Iterate_unprotected() 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.com/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_unprotected(
30  const RBTree_Control *rbtree,
31  RBTree_Direction dir,
32  RBTree_Visitor visitor,
33  void *visitor_arg
34)
35{
36  RBTree_Direction opp_dir = _RBTree_Opposite_direction( dir );
37  const RBTree_Node *current = _RBTree_First( rbtree, opp_dir );
38  bool stop = false;
39
40  while ( !stop && current != NULL ) {
41    stop = (*visitor)( current, dir, visitor_arg );
42
43    current = _RBTree_Next_unprotected( current, dir );
44  }
45}
Note: See TracBrowser for help on using the repository browser.