This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v2 06/20] sysdeps/futex: Use futex_time64 if avaliable
On Tue, Jun 25, 2019 at 1:26 PM Andreas Schwab <schwab@suse.de> wrote:
> On Jun 25 2019, Florian Weimer <fweimer@redhat.com> wrote:
> >
> > I don't think a compile-time check in generic code is correct here. It
> > will cause binaries to fail to run on older kernels which do not have
> > the system call. This is obviously not a concern for 32-bit RISC-V, but
> > it is not acceptable for i386, for example.
> >
> > I still think you should define __NR_futex in RV32 <sysdep.h>.
>
> For existing 32-bit archs there needs to be a runtime check (if both
> __NR_futex and __NR_futex_time64 are defined).
That opens the question what type this function should take,
because one of the two will require the time argument to be
converted.
For instance pthread_timedjoin_np() is a public interface
that will need an additional version to deal with time64.
Should pthread_timedjoin_np() convert the user timespec
to __timespec64 and pass it down to lll_futex_syscall(),
which then converts it back to timespec before calling
__NR_futex() on 32-bit architectures, or is there a way to
avoid the double conversion?
Arnd
Arnd