summaryrefslogtreecommitdiffstats
path: root/get_syscall_range.template.c
diff options
context:
space:
mode:
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
+}