1 // SPDX-License-Identifier: GPL-2.0 2 3 #include <linux/export.h> 4 #include <linux/sched/task.h> 5 6 struct task_struct *rust_helper_get_current(void) 7 { 8 return current; 9 } 10 EXPORT_SYMBOL_GPL(rust_helper_get_current); 11 12 void rust_helper_get_task_struct(struct task_struct *t) 13 { 14 get_task_struct(t); 15 } 16 EXPORT_SYMBOL_GPL(rust_helper_get_task_struct); 17 18 void rust_helper_put_task_struct(struct task_struct *t) 19 { 20 put_task_struct(t); 21 } 22 EXPORT_SYMBOL_GPL(rust_helper_put_task_struct); 23