aboutsummaryrefslogtreecommitdiff
path: root/rust/helpers/mutex.c
diff options
context:
space:
mode:
Diffstat (limited to 'rust/helpers/mutex.c')
-rw-r--r--rust/helpers/mutex.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/rust/helpers/mutex.c b/rust/helpers/mutex.c
new file mode 100644
index 000000000000..a17ca8cdb50c
--- /dev/null
+++ b/rust/helpers/mutex.c
@@ -0,0 +1,15 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/export.h>
+#include <linux/mutex.h>
+
+void rust_helper_mutex_lock(struct mutex *lock)
+{
+ mutex_lock(lock);
+}
+
+void rust_helper___mutex_init(struct mutex *mutex, const char *name,
+ struct lock_class_key *key)
+{
+ __mutex_init(mutex, name, key);
+}