Lines Matching defs:rt

50 void rb_tree_init (rb_tree_t * rt);
51 rb_node_index_t rb_tree_add (rb_tree_t * rt, u32 key);
52 rb_node_index_t rb_tree_add2 (rb_tree_t * rt, u32 key, uword opaque);
53 rb_node_index_t rb_tree_add_custom (rb_tree_t * rt, u32 key, uword opaque,
55 void rb_tree_del (rb_tree_t * rt, u32 key);
56 void rb_tree_del_node (rb_tree_t * rt, rb_node_t * z);
57 void rb_tree_del_custom (rb_tree_t * rt, u32 key, rb_tree_lt_fn ltfn);
58 void rb_tree_free_nodes (rb_tree_t * rt);
59 u32 rb_tree_n_nodes (rb_tree_t * rt);
60 rb_node_t *rb_tree_min_subtree (rb_tree_t * rt, rb_node_t * x);
61 rb_node_t *rb_tree_max_subtree (rb_tree_t * rt, rb_node_t * x);
62 rb_node_t *rb_tree_search_subtree (rb_tree_t * rt, rb_node_t * x, u32 key);
63 rb_node_t *rb_tree_search_subtree_custom (rb_tree_t * rt, rb_node_t * x,
65 rb_node_t *rb_tree_successor (rb_tree_t * rt, rb_node_t * x);
66 rb_node_t *rb_tree_predecessor (rb_tree_t * rt, rb_node_t * x);
67 int rb_tree_is_init (rb_tree_t * rt);
70 rb_node_index (rb_tree_t * rt, rb_node_t * n)
72 return n - rt->nodes;
76 rb_node_is_tnil (rb_tree_t * rt, rb_node_t * n)
78 return rb_node_index (rt, n) == RBTREE_TNIL_INDEX;
82 rb_node (rb_tree_t * rt, rb_node_index_t ri)
84 return pool_elt_at_index (rt->nodes, ri);
88 rb_node_right (rb_tree_t * rt, rb_node_t * n)
90 return pool_elt_at_index (rt->nodes, n->right);
94 rb_node_left (rb_tree_t * rt, rb_node_t * n)
96 return pool_elt_at_index (rt->nodes, n->left);
100 rb_node_parent (rb_tree_t * rt, rb_node_t * n)
102 return pool_elt_at_index (rt->nodes, n->parent);