diff options
Diffstat (limited to 'src/linux/ia64/shuffle_scno.c')
-rw-r--r-- | src/linux/ia64/shuffle_scno.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/linux/ia64/shuffle_scno.c b/src/linux/ia64/shuffle_scno.c new file mode 100644 index 000000000..6bac3a8b7 --- /dev/null +++ b/src/linux/ia64/shuffle_scno.c @@ -0,0 +1,11 @@ +static_assert(!(SYSCALLENT_BASE_NR & (SYSCALLENT_BASE_NR - 1)), + "SYSCALLENT_BASE_NR is not a power of 2 (or zero)"); +static_assert(nsyscalls0 < SYSCALLENT_BASE_NR, + "syscall table is too big, " + "shuffling will only make everything worse"); + +kernel_ulong_t +shuffle_scno(kernel_ulong_t scno) +{ + return scno ^ SYSCALLENT_BASE_NR; +} |