diff options
author | 2024-09-27 15:36:52 -0300 | |
---|---|---|
committer | 2024-09-27 15:36:52 -0300 | |
commit | 52c996d3f40b40f87ef9dc80596903309682acc3 (patch) | |
tree | cccf9d5d20463b6930054e6f083f778f7ebe487a /rust/helpers/task.c | |
parent | perf symbol: Set binary_type of dso when loading (diff) | |
parent | Merge tag 'mm-hotfixes-stable-2024-09-27-09-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm (diff) | |
download | wireguard-linux-52c996d3f40b40f87ef9dc80596903309682acc3.tar.xz wireguard-linux-52c996d3f40b40f87ef9dc80596903309682acc3.zip |
Merge remote-tracking branch 'torvalds/master' into perf-tools
To pick up changes in other trees that may affect perf, such as libbpf
and in general the header files that perf has copies of, so that we can
do the sync with the kernel sources.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'rust/helpers/task.c')
-rw-r--r-- | rust/helpers/task.c | 19 |
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); +} |