xref: /linux/rust/helpers/rbtree.c (revision c31f4aa8fed048fa70e742c4bb49bb48dc489ab3)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/rbtree.h>
4 
5 void rust_helper_rb_link_node(struct rb_node *node, struct rb_node *parent,
6 			      struct rb_node **rb_link)
7 {
8 	rb_link_node(node, parent, rb_link);
9 }
10 
11 struct rb_node *rust_helper_rb_first(const struct rb_root *root)
12 {
13 	return rb_first(root);
14 }
15 
16 struct rb_node *rust_helper_rb_last(const struct rb_root *root)
17 {
18 	return rb_last(root);
19 }
20