diff options
Diffstat (limited to 'rust/helpers/spinlock.c')
-rw-r--r-- | rust/helpers/spinlock.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/rust/helpers/spinlock.c b/rust/helpers/spinlock.c index 92f7fc418425..5971fdf6f755 100644 --- a/rust/helpers/spinlock.c +++ b/rust/helpers/spinlock.c @@ -1,6 +1,5 @@ // SPDX-License-Identifier: GPL-2.0 -#include <linux/export.h> #include <linux/spinlock.h> void rust_helper___spin_lock_init(spinlock_t *lock, const char *name, @@ -26,3 +25,8 @@ void rust_helper_spin_unlock(spinlock_t *lock) { spin_unlock(lock); } + +int rust_helper_spin_trylock(spinlock_t *lock) +{ + return spin_trylock(lock); +} |