diff options
Diffstat (limited to 'rust/helpers/rbtree.c')
| -rw-r--r-- | rust/helpers/rbtree.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rust/helpers/rbtree.c b/rust/helpers/rbtree.c new file mode 100644 index 000000000000..2a0eabbb4160 --- /dev/null +++ b/rust/helpers/rbtree.c @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0 + +#include <linux/rbtree.h> + +void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent, + struct rb_node **rb_link) +{ + rb_link_node(node, parent, rb_link); +} + +struct rb_node *rust_helper_rb_first(const struct rb_root *root) +{ + return rb_first(root); +} + +struct rb_node *rust_helper_rb_last(const struct rb_root *root) +{ + return rb_last(root); +} |
