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