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