[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251202-define-rust-helper-v1-3-a2e13cbc17a6@google.com>
Date: Tue, 02 Dec 2025 19:37:27 +0000
From: Alice Ryhl <aliceryhl@...gle.com>
To: rust-for-linux@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, Alice Ryhl <aliceryhl@...gle.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Carlos Llamas <cmllamas@...gle.com>
Subject: [PATCH 03/46] rust: binder: add __rust_helper to helpers
This is needed to inline these helpers into Rust code.
Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
---
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Carlos Llamas <cmllamas@...gle.com>
---
rust/helpers/binder.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/rust/helpers/binder.c b/rust/helpers/binder.c
index 224d38a92f1d985d78767d5a72f5ff60765b8508..a2327f1b3c9443df0ecd33275f98d4719f0ab8f1 100644
--- a/rust/helpers/binder.c
+++ b/rust/helpers/binder.c
@@ -7,20 +7,21 @@
#include <linux/list_lru.h>
#include <linux/task_work.h>
-unsigned long rust_helper_list_lru_count(struct list_lru *lru)
+__rust_helper unsigned long rust_helper_list_lru_count(struct list_lru *lru)
{
return list_lru_count(lru);
}
-unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
- list_lru_walk_cb isolate, void *cb_arg,
- unsigned long nr_to_walk)
+__rust_helper unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
+ list_lru_walk_cb isolate,
+ void *cb_arg,
+ unsigned long nr_to_walk)
{
return list_lru_walk(lru, isolate, cb_arg, nr_to_walk);
}
-void rust_helper_init_task_work(struct callback_head *twork,
- task_work_func_t func)
+__rust_helper void rust_helper_init_task_work(struct callback_head *twork,
+ task_work_func_t func)
{
init_task_work(twork, func);
}
--
2.52.0.158.g65b55ccf14-goog
Powered by blists - more mailing lists