This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v2 03/20] y2038: linux: Provide __clock_settime64 implementation
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: Joseph Myers <joseph at codesourcery dot com>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Palmer Dabbelt <palmer at sifive dot com>, macro at wdc dot com, Zong Li <zongbox at gmail dot com>, Zong Li <zong at andestech dot com>, Alistair Francis <alistair23 at gmail dot com>
- Date: Thu, 27 Jun 2019 17:45:39 +0200
- Subject: Re: [RFC v2 03/20] y2038: linux: Provide __clock_settime64 implementation
- References: <cover.1561421042.git.alistair.francis@wdc.com> <4a1304510a5c9b5c2f6432bfdc5c9fd1740a081f.1561421042.git.alistair.francis@wdc.com> <CAK8P3a1fpqmFWMXAmV9KmuYFegRG958tLr9u=spELuRwXKfRiQ@mail.gmail.com> <20190625175125.03375ead@jawa> <CAK8P3a3AUgWzuZaZR5p2brmK16cMviidTf6A4aZ=mXVuNySbpA@mail.gmail.com> <20190626110711.64e8cd2f@jawa> <CAK8P3a0FVRV5H9f=wcU+C47R7FEckyjPtGVD2VaTAXsguEzyqw@mail.gmail.com> <20190626170344.2c9d1d47@jawa> <CAK8P3a2i1FktDrk1j5+qrTcUfqW=a=OviTVxyvTq8Vr0=Mw41Q@mail.gmail.com> <20190627005517.418d26c2@jawa> <CAK8P3a2SCjaR5OjQRRUVPMHbobYQUVXO1CEcp8gG0RhKjUoEpg@mail.gmail.com> <20190627123557.01356d4d@jawa> <CAK8P3a0UN1wy3BvTUD7UpOOS15O6hCJRP-+VdwQdinwKTnvmQA@mail.gmail.com> <20190627160758.6fe824cf@jawa> <CAK8P3a1XBLBnkTMiBD8-ReR3Qmf67m5gfS1AciYeuy8hf2_R5A@mail.gmail.com> <20190627172333.1a979f6d@jawa>
On Thu, Jun 27, 2019 at 5:23 PM Lukasz Majewski <lukma@denx.de> wrote:
>
> I think that it is not necessary as the patch [1] has following code:
> #if __TIMESIZE == 64
> # define __clock_settime64 __clock_settime
> #else
> extern int __clock_settime64 (clockid_t clock_id,
> const struct __timespec64 *tp);
> libc_hidden_proto (__clock_settime64)
> #endif
>
> So for archs supporting 64 bit time syscalls (WORDSIZE==64 &&
> WORDSIZE_SYSCALLS==64) we have the #define and the
> weak_alias (__clock_settime, clock_settime) does the job.
Ok, so you redirect both __clock_settime64 to __clock_settime
and __NR_settime64 to __NR_settime, in order to get back to the
same definition that you have today on 64-bit.
Sorry for taking so long to understand that.
> If you are interested, please look into patch [2], which is a
> proposition of using clock_settime as a part of Y2038 safe system.
> This code corresponds to v3 of adding clock_settime syscall support,
> which is a bit outdated as now we discuss v5. It gives a rough idea
> though.
Yes, that part looked fine to me from the beginning.
Arnd