xref: /linux/rust/helpers/binder.c (revision 6093a688a07da07808f0122f9aa2a3eed250d853)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 /*
4  * Copyright (C) 2025 Google LLC.
5  */
6 
7 #include <linux/list_lru.h>
8 #include <linux/task_work.h>
9 
10 unsigned long rust_helper_list_lru_count(struct list_lru *lru)
11 {
12 	return list_lru_count(lru);
13 }
14 
15 unsigned long rust_helper_list_lru_walk(struct list_lru *lru,
16 					list_lru_walk_cb isolate, void *cb_arg,
17 					unsigned long nr_to_walk)
18 {
19 	return list_lru_walk(lru, isolate, cb_arg, nr_to_walk);
20 }
21 
22 void rust_helper_init_task_work(struct callback_head *twork,
23 				task_work_func_t func)
24 {
25 	init_task_work(twork, func);
26 }
27