mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 05:24:39 +01:00
This is needed to inline these helpers into Rust code. Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Gary Guo <gary@garyguo.net> Signed-off-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20260105-define-rust-helper-v2-15-51da5f454a67@google.com Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
20 lines
454 B
C
20 lines
454 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/rbtree.h>
|
|
|
|
__rust_helper 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);
|
|
}
|
|
|
|
__rust_helper struct rb_node *rust_helper_rb_first(const struct rb_root *root)
|
|
{
|
|
return rb_first(root);
|
|
}
|
|
|
|
__rust_helper struct rb_node *rust_helper_rb_last(const struct rb_root *root)
|
|
{
|
|
return rb_last(root);
|
|
}
|