summaryrefslogtreecommitdiff
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorJerome Brunet <jbrunet@baylibre.com>2024-09-30 12:28:07 +0300
committerJerome Brunet <jbrunet@baylibre.com>2024-09-30 12:28:07 +0300
commit3fd6c59042dbba50391e30862beac979491145fe (patch)
tree63d729254efdf6446d4d4a05e7a8a0dd803eedec /rust/helpers/task.c
parent1d7ec62374bf049349c47f07f0b95a6524bb1b98 (diff)
parent9852d85ec9d492ebef56dc5f229416c925758edc (diff)
downloadlinux-3fd6c59042dbba50391e30862beac979491145fe.tar.xz
Merge tag 'v6.12-rc1' into clk-meson-next
Linux 6.12-rc1
Diffstat (limited to 'rust/helpers/task.c')
-rw-r--r--rust/helpers/task.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/rust/helpers/task.c b/rust/helpers/task.c
new file mode 100644
index 000000000000..7ac789232d11
--- /dev/null
+++ b/rust/helpers/task.c
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/export.h>
+#include <linux/sched/task.h>
+
+struct task_struct *rust_helper_get_current(void)
+{
+ return current;
+}
+
+void rust_helper_get_task_struct(struct task_struct *t)
+{
+ get_task_struct(t);
+}
+
+void rust_helper_put_task_struct(struct task_struct *t)
+{
+ put_task_struct(t);
+}