Cleanup: Move instrumentation/ headers to include/instrumentation/
[lttng-modules.git] / wrapper / syscall.h
CommitLineData
b7cdc182 1/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
1b7b9c65
MJ
2 *
3 * wrapper/syscall.h
4 *
5 * wrapper around asm/syscall.h.
6 *
7 * Copyright (C) 2019 Michael Jeanson <mjeanson@efficios.com>
8 */
9
10#ifndef _LTTNG_WRAPPER_SYSCALL_H
11#define _LTTNG_WRAPPER_SYSCALL_H
12
13#include <asm/syscall.h>
2df37e95 14#include <lttng/kernel-version.h>
1b7b9c65
MJ
15
16#define LTTNG_SYSCALL_NR_ARGS 6
17
18#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0))
19
20#define lttng_syscall_get_arguments(task, regs, args) \
21 syscall_get_arguments(task, regs, args)
22
23#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) */
24
25static inline
26void lttng_syscall_get_arguments(struct task_struct *task,
27 struct pt_regs *regs, unsigned long *args)
28{
29 syscall_get_arguments(task, regs, 0, LTTNG_SYSCALL_NR_ARGS, args);
30}
31
32#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(5,1,0) */
33
34#endif /* _LTTNG_WRAPPER_SYSCALL_H */
This page took 0.024897 seconds and 4 git commands to generate.