diff options
author | Florin Coras <fcoras@cisco.com> | 2019-04-19 18:50:34 -0700 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2019-04-19 19:20:07 -0700 |
commit | f7cda7a9bc399258959084154263c42c5a91e030 (patch) | |
tree | f1122bcc6da7b0d7a849092e564479ea124c9cd1 /src/vppinfra/rbtree.h | |
parent | 51cbbd2282f39ff1b64781c73efbbe3b332ed3d9 (diff) |
rbtree: add successor and predecessor functions
Change-Id: I6934beaf5c08bae2d4f0bd3a6bb811810407c1f9
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vppinfra/rbtree.h')
-rw-r--r-- | src/vppinfra/rbtree.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vppinfra/rbtree.h b/src/vppinfra/rbtree.h index ace07ac5622..73180d1d54c 100644 --- a/src/vppinfra/rbtree.h +++ b/src/vppinfra/rbtree.h @@ -54,6 +54,8 @@ u32 rb_tree_n_nodes (rb_tree_t * rt); rb_node_t *rb_tree_min_subtree (rb_tree_t * rt, rb_node_t * x); rb_node_t *rb_tree_max_subtree (rb_tree_t * rt, rb_node_t * x); rb_node_t *rb_tree_search_subtree (rb_tree_t * rt, rb_node_t * x, u32 key); +rb_node_t *rb_tree_successor (rb_tree_t * rt, rb_node_t * x); +rb_node_t *rb_tree_predecessor (rb_tree_t * rt, rb_node_t * x); static inline rb_node_index_t rb_node_index (rb_tree_t * rt, rb_node_t * n) |