blob: eb9b11eeac801fe67a4016f3d81ef55364e7aaa6 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
/* See LICENSE file for copyright and license details. */
#include "common.h"
#include "generated/get_syscall_range.c"
enum libsyscalls_error
libsyscalls_get_syscall_range(enum libsyscalls_os os, enum libsyscalls_arch arch, long long int *min_out, long long int *max_out)
{
long long int discarded;
if (!min_out) min_out = &discarded;
if (!max_out) max_out = &discarded;
#define CASE(UPPERCASE, LOWERCASE)\
case LIBSYSCALLS_OS_##UPPERCASE:\
return get_##LOWERCASE##_syscall_range(arch, min_out, max_out)
switch ((int)os) {
LIST_OSES(CASE, ;);
default:
return LIBSYSCALLS_E_OSNOSUP;
}
#undef CASE
}
|