summaryrefslogtreecommitdiff
path: root/rust/helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'rust/helpers.c')
-rw-r--r--rust/helpers.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/rust/helpers.c b/rust/helpers.c
index 04b9be46e887..86af099d2d66 100644
--- a/rust/helpers.c
+++ b/rust/helpers.c
@@ -22,6 +22,7 @@
#include <linux/build_bug.h>
#include <linux/err.h>
#include <linux/refcount.h>
+#include <linux/mutex.h>
__noreturn void rust_helper_BUG(void)
{
@@ -29,6 +30,12 @@ __noreturn void rust_helper_BUG(void)
}
EXPORT_SYMBOL_GPL(rust_helper_BUG);
+void rust_helper_mutex_lock(struct mutex *lock)
+{
+ mutex_lock(lock);
+}
+EXPORT_SYMBOL_GPL(rust_helper_mutex_lock);
+
refcount_t rust_helper_REFCOUNT_INIT(int n)
{
return (refcount_t)REFCOUNT_INIT(n);