Messages in this thread | | | From | Arnd Bergmann <> | Date | Thu, 14 Oct 2021 08:46:27 +0200 | Subject | Re: [PATCH 1/2] perf bench futex: Use a 64-bit time_t |
| |
On Thu, Oct 14, 2021 at 7:55 AM Alistair Francis <alistair.francis@opensource.wdc.com> wrote:
> +/** > + * We only support 64-bit time_t for the timeout. > + * On 64-bit architectures we can use __NR_futex > + * On 32-bit architectures we use __NR_futex_time64. This only works on kernel > + * versions 5.1+. > + */ > +#if __BITS_PER_LONG == 64 || defined(__i386__) > +# define futex(uaddr, op, val, timeout, uaddr2, val3, opflags) \ > + syscall(__NR_futex, uaddr, op | opflags, val, timeout, uaddr2, val3) > +#else > +# define futex(uaddr, op, val, timeout, uaddr2, val3, opflags) \ > + syscall(__NR_futex_time64, uaddr, op | opflags, val, timeout, uaddr2, val3) > +#endif
That __i386__ check looks wrong, was this meant to check for x32 instead?
In that case, I wouldn't bother, as x32 can also just use the futex_time64 call like the normal 32-bit architectures.
Arnd
| |