aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/rust/helpers/task.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.com>2024-11-18 21:29:33 +0100
committerJiri Kosina <jkosina@suse.com>2024-11-18 21:29:33 +0100
commitf33e46a0c6bddd341d0989484a2546bba7ac4a3c (patch)
tree4918985ab00890205c8d77d0553472e12e01cd55 /rust/helpers/task.c
parentHID: hyperv: streamline driver probe to avoid devres issues (diff)
parentHID: wacom: Set eraser status when either 'Eraser' or 'Invert' usage is set (diff)
downloadwireguard-linux-f33e46a0c6bddd341d0989484a2546bba7ac4a3c.tar.xz
wireguard-linux-f33e46a0c6bddd341d0989484a2546bba7ac4a3c.zip
Merge branch 'for-6.13/wacom' into for-linus
- Sanitization of BTN_TOOL_RUBBER handling (Jason Gerecke)
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);
+}