xref: /linux/rust/helpers/rbtree.c (revision 830988b6cf197e6dcffdfe2008c5738e6c6c3c0f)
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