xref: /linux/rust/helpers/xarray.c (revision ec7714e4947909190ffb3041a03311a975350fe0)
1 // SPDX-License-Identifier: GPL-2.0
2 
3 #include <linux/xarray.h>
4 
rust_helper_xa_err(void * entry)5 int rust_helper_xa_err(void *entry)
6 {
7 	return xa_err(entry);
8 }
9 
rust_helper_xa_init_flags(struct xarray * xa,gfp_t flags)10 void rust_helper_xa_init_flags(struct xarray *xa, gfp_t flags)
11 {
12 	return xa_init_flags(xa, flags);
13 }
14 
rust_helper_xa_trylock(struct xarray * xa)15 int rust_helper_xa_trylock(struct xarray *xa)
16 {
17 	return xa_trylock(xa);
18 }
19 
rust_helper_xa_lock(struct xarray * xa)20 void rust_helper_xa_lock(struct xarray *xa)
21 {
22 	return xa_lock(xa);
23 }
24 
rust_helper_xa_unlock(struct xarray * xa)25 void rust_helper_xa_unlock(struct xarray *xa)
26 {
27 	return xa_unlock(xa);
28 }
29