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