diff options
Diffstat (limited to 'tools/perf/bench/futex.h')
-rw-r--r-- | tools/perf/bench/futex.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/perf/bench/futex.h b/tools/perf/bench/futex.h index 31b53cc7d5bc..33f3f3230ae1 100644 --- a/tools/perf/bench/futex.h +++ b/tools/perf/bench/futex.h @@ -14,6 +14,19 @@ #include <linux/futex.h> /** + * SYS_futex is expected from system C library, + * in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex) + * some newer 32bit architectures e.g. RISCV32 is using 64bit time_t from + * get go unlike other 32bit architectures in glibc, therefore it wont have + * NR_futex defined but just NR_futex_time64 this aliases it to NR_futex + * so that SYS_futex is then defined for rv32 +*/ + +#if !defined(SYS_futex) && defined(SYS_futex_time64) +#define SYS_futex SYS_futex_time64 +#endif + +/** * futex() - SYS_futex syscall wrapper * @uaddr: address of first futex * @op: futex op code |