From c131f122778c62f920a99bbf854ced4a37ee8b03 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 3 Dec 2023 19:23:35 +0100 Subject: First commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- get_syscall_range.template.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 get_syscall_range.template.c (limited to 'get_syscall_range.template.c') diff --git a/get_syscall_range.template.c b/get_syscall_range.template.c new file mode 100644 index 0000000..ad35cf4 --- /dev/null +++ b/get_syscall_range.template.c @@ -0,0 +1,23 @@ +/* See LICENSE file for copyright and license details. */ + + +#include "zzz-syscalls.h" /* in generated/ */ + +static enum libsyscalls_error +get_zzz_syscall_range(enum libsyscalls_arch arch, long long int *min_out, long long int *max_out) +{ +#define CASE(ARCH)\ + case LIBSYSCALLS_ARCH_##ARCH:\ + *min_out = MIN_ZZZ_SYSCALL_FOR_##ARCH;\ + *max_out = MAX_ZZZ_SYSCALL_FOR_##ARCH;\ + break + + switch ((int)arch) { + LIST_ZZZ_ARCHES(CASE, ;); + default: + return LIBSYSCALLS_E_ARCHNOSUP; + } + return LIBSYSCALLS_E_OK; + +#undef CASE +} -- cgit v1.2.3-70-g09d2