RTEMS
rbtreenext.c
Go to the documentation of this file.
1 
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 #ifdef HAVE_CONFIG_H
24 #include "config.h"
25 #endif
26 
27 #include <rtems/score/rbtreeimpl.h>
28 #include <rtems/score/basedefs.h>
29 
30 RB_GENERATE_MINMAX( RBTree_Control, RBTree_Node, Node, static )
31 
32 RB_GENERATE_NEXT( RBTree_Control, RBTree_Node, Node, static )
33 
34 RB_GENERATE_PREV( RBTree_Control, RBTree_Node, Node, static )
35 
36 RBTree_Node *_RBTree_Minimum( const RBTree_Control *tree )
37 {
38  return RB_MIN( RBTree_Control, RTEMS_DECONST( RBTree_Control *, tree ) );
39 }
40 
41 RBTree_Node *_RBTree_Maximum( const RBTree_Control *tree )
42 {
43  return RB_MAX( RBTree_Control, RTEMS_DECONST( RBTree_Control *, tree ) );
44 }
45 
47 {
48  return RB_NEXT( RBTree_Control, NULL, RTEMS_DECONST( RBTree_Node *, node ) );
49 }
50 
52 {
53  return RB_PREV( RBTree_Control, NULL, RTEMS_DECONST( RBTree_Node *, node ) );
54 }
RBTree_Node * _RBTree_Predecessor(const RBTree_Node *node)
Returns the predecessor of a node.
Definition: rbtreenext.c:51
Red-black tree node.
Definition: rbtree.h:55
RBTree_Node * _RBTree_Minimum(const RBTree_Control *tree)
Returns the minimum node of the red-black tree.
Definition: rbtreenext.c:36
RBTree_Node * _RBTree_Successor(const RBTree_Node *node)
Returns the successor of a node.
Definition: rbtreenext.c:46
Inlined Routines Associated with Red-Black Trees.
This header file provides basic definitions used by the API and the implementation.
RBTree_Node * _RBTree_Maximum(const RBTree_Control *tree)
Returns the maximum node of the red-black tree.
Definition: rbtreenext.c:41
#define RTEMS_DECONST(_type, _var)
Performs a type cast which removes const qualifiers without warnings to the specified type for the sp...
Definition: basedefs.h:579