RTEMS CPU Kit with SuperCore  4.10.99.0
Data Structures | Defines | Typedefs | Enumerations | Functions
rtems/score/rbtree.h File Reference

Constants and Structures Associated with the Red-Black Tree Handler. More...

#include <stddef.h>
#include <rtems/score/address.h>
#include <rtems/score/rbtree.inl>
Include dependency graph for rbtree.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  RBTree_Node_struct
 This is used to manage each element (node) which is placed on a RBT. More...
struct  RBTree_Control
 This is used to manage a RBT. More...

Defines

#define _RBTree_Container_of(node, container_type, node_field_name)
 Macro to return the structure containing the node.
#define RBTREE_INITIALIZER_EMPTY(name)
 RBTree initializer for an empty rbtree with designator name.
#define RBTREE_DEFINE_EMPTY(name)   RBTree_Control name = RBTREE_INITIALIZER_EMPTY(name)
 RBTree definition for an empty rbtree with designator name.
#define RBTREE_NODE_INITIALIZER_EMPTY(name)
 RBTree_Node initializer for an empty node with designator name.
#define RBTREE_NODE_DEFINE_EMPTY(name)   RBTree_Node name = RBTREE_NODE_INITIALIZER_EMPTY(name)
 RBTree definition for an empty rbtree with designator name.

Typedefs

typedef struct RBTree_Node_struct RBTree_Node
 This type definition promotes the name for the RBTree Node used by all RTEMS code.
typedef int(* RBTree_Compare_function )(const RBTree_Node *node1, const RBTree_Node *node2)
 This type defines function pointers for user-provided comparison function.
typedef bool(* RBTree_Visitor )(const RBTree_Node *node, RBTree_Direction dir, void *visitor_arg)
 Red-black tree visitor.

Enumerations

enum  RBTree_Color { RBT_BLACK, RBT_RED }
 This enum type defines the colors available for the RBTree Nodes.
enum  RBTree_Direction { RBT_LEFT = 0, RBT_RIGHT = 1 }
 This type indicates the direction.

Functions

void _RBTree_Initialize (RBTree_Control *the_rbtree, RBTree_Compare_function compare_function, void *starting_address, size_t number_nodes, size_t node_size, bool is_unique)
 Initialize a RBTree Header.
RBTree_Node_RBTree_Get (RBTree_Control *the_rbtree, RBTree_Direction dir)
 Obtain the min or max node of a rbtree.
RBTree_Node_RBTree_Find_unprotected (const RBTree_Control *the_rbtree, const RBTree_Node *the_node)
 Find the node with given key in the tree.
RBTree_Node_RBTree_Find (const RBTree_Control *the_rbtree, const RBTree_Node *the_node)
 Find the node with given key in the tree.
RBTree_Control_RBTree_Find_header (RBTree_Node *the_node)
 Find the control structure of the tree containing the given node.
RBTree_Node_RBTree_Insert_unprotected (RBTree_Control *the_rbtree, RBTree_Node *the_node)
 Insert the_node on the Red-Black Tree the_rbtree (unprotected).
RBTree_Node_RBTree_Insert (RBTree_Control *the_rbtree, RBTree_Node *the_node)
 Insert a node on a rbtree.
void _RBTree_Extract_unprotected (RBTree_Control *the_rbtree, RBTree_Node *the_node)
 Extracts (removes) the_node from the_rbtree (unprotected).
void _RBTree_Extract (RBTree_Control *the_rbtree, RBTree_Node *the_node)
 Delete a node from the rbtree.
RBTree_Node_RBTree_Next_unprotected (const RBTree_Node *node, RBTree_Direction dir)
 Returns the in-order next node of a node.
RBTree_Node_RBTree_Next (const RBTree_Node *node, RBTree_Direction dir)
void _RBTree_Iterate_unprotected (const RBTree_Control *rbtree, RBTree_Direction dir, RBTree_Visitor visitor, void *visitor_arg)
 Red-black tree iteration.

Detailed Description

Constants and Structures Associated with the Red-Black Tree Handler.

This include file contains all the constants and structures associated with the Red-Black Tree Handler.