summaryrefslogtreecommitdiff
path: root/rust/helpers/binder.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2025-12-02 14:46:11 +0100
committerJiri Kosina <jkosina@suse.com>2025-12-02 14:46:11 +0100
commit7362b5b493102c6b71827c2da22117b475528f6d (patch)
tree62888e5fb3459077d2874c61bc8b378d7bf5c7da /rust/helpers/binder.c
parenteb41c955b05ea015275b3188b27b3960a95ae149 (diff)
parent06416555c883e3ffabcc62ad39617c23d6b2f012 (diff)
Merge branch 'for-6.19/nintendo' into for-linus
- switch to WQ_PERCPU workaueues (Marco Crivellari) - reduce potential initialization blocking time of hid-nintendo (Willy Huang)
Diffstat (limited to 'rust/helpers/binder.c')
-rw-r--r--rust/helpers/binder.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/rust/helpers/binder.c b/rust/helpers/binder.c
new file mode 100644
index 000000000000..224d38a92f1d
--- /dev/null
+++ b/rust/helpers/binder.c
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * Copyright (C) 2025 Google LLC.
+ */
+
+#include <linux/list_lru.h>
+#include <linux/task_work.h>
+
+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)
+{
+ 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)
+{
+ init_task_work(twork, func);
+}