summaryrefslogtreecommitdiffstats
path: root/get_syscall_range.template.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-12-03 19:23:35 +0100
committerMattias Andrée <maandree@kth.se>2023-12-03 19:23:35 +0100
commitc131f122778c62f920a99bbf854ced4a37ee8b03 (patch)
tree14c933f98f4d64dffb0a594bc40dd5121c6c5a8e /get_syscall_range.template.c
downloadlibsyscalls-c131f122778c62f920a99bbf854ced4a37ee8b03.tar.gz
libsyscalls-c131f122778c62f920a99bbf854ced4a37ee8b03.tar.bz2
libsyscalls-c131f122778c62f920a99bbf854ced4a37ee8b03.tar.xz
First commit
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'get_syscall_range.template.c')
-rw-r--r--get_syscall_range.template.c23
1 files changed, 23 insertions, 0 deletions
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
+}