This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v6 04/23] linux: Use 32-bit time_t for itimerval
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Alistair Francis <alistair23 at gmail dot com>
- Cc: Lukasz Majewski <lukma at denx dot de>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Arnd Bergmann <arnd at arndb dot de>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Palmer Dabbelt <palmerdabbelt at google dot com>, "Maciej W. Rozycki" <macro at wdc dot com>, Zong Li <zongbox at gmail dot com>
- Date: Fri, 17 Jan 2020 14:14:55 +0000
- Subject: Re: [RFC v6 04/23] linux: Use 32-bit time_t for itimerval
- Ironport-sdr: 0forRXQvb0YOaDFcGe5gRGLcjGhRk4nf2jjQge7dVflcDhW92sCy/XzUrzzHMSEGr/zNDriJbs S3Sh/ygAGF5yskUXCLrstTvs8hHggjpJ4xAD5zcdtgC7FTWQW2FfITEB37odN9iUN9qFtzLF5E et4zyJquVqVCVb/nVWShVnZmNrqEyg/P/1CvDhuysabz2+BTRXeShh4Y9W9iNr+cptb8rTZfrT /054Laly/VWZMjHW8bG2J68Li/6QRORdOlA6/e/tXWtGfzhMDtz28wuKjp9eDfjKpUM/aZBW9R KM0=
- Ironport-sdr: Eh+8NM0+u8Iwco1kUJ/ylnUI1Yndo5ghT70Fi+F+gqDSPZH8arFLV56cDlp90b36HooL5CqaOR Zl3Mk8IEsPTb/ET6VBeaxlB9wm1z61qsWrNMXN4ZVi4oJCQOAUYlkoqKATw4VsVT5KQ8hLM4X2 lImKDujvR6Be8zOaS0j9y5uBpYo9P0QGG3znjPvpjIjD7J8YzwIuEABh9E+Y1h0+GU7HrF2ElD 48xTwlC5M7ajkykf3fYtGSLoFV3caKqa2qW29RXmuzoKDskFe8kfIQ737soZNlXvWLQFFzvfnQ EMs=
- References: <cover.1578824547.git.alistair.francis@wdc.com> <6fce89fec812352770884a62c6fa158890480e2a.1578824547.git.alistair.francis@wdc.com> <20200114115848.396c6eaf@jawa> <CAKmqyKN1noTcCVMSCfS_wNOCGOtssaB9bDJ16JafMzUzvnmpcA@mail.gmail.com> <alpine.DEB.2.21.2001160117490.11220@digraph.polyomino.org.uk> <CAKmqyKO4dcnZnu0kryZFSJxp=t8BwS1Jkupf5Na6PeD4DM2j2g@mail.gmail.com> <20200116143432.4e5c3010@jawa> <CAKmqyKNOeUvhTCUHw6ZH-qtApEL-0gqmfV9PpimpDDw3bCS5cw@mail.gmail.com> <20200117121407.2732e69f@jawa> <CAKmqyKOs_D0FvYn_gnMKoh=v+XC0b+rpvuwPg3nkY1yS8cZGEg@mail.gmail.com>
On Fri, 17 Jan 2020, Alistair Francis wrote:
> So basically follow the other implementations (or the link directly
> above) and add a __getitimer64/__setitimer64 function and a wrapper
> __getitimer/__setitimer for the current 32-bit time_t.
Yes.
We are in the middle of a very long series of patches - maybe ending up as
hundreds of patches - that *prepare* for adding support for _TIME_BITS=64.
None of those patches actually contain any _TIME_BITS or __USE_TIME_BITS64
conditionals, because it's important that users of glibc get a consistent
API (we don't want an intermediate state where defining _TIME_BITS=64
gives users a broken interface where different functions have different
notions of time_t, for example). But new patches relating to 64-bit times
should be consistent with the design of support for 64-bit time on systems
that currently use 32-bit time. And that means having a main function
that uses 64-bit times in its interface, and on systems with 32-bit time,
a thin wrapper that converts 32-bit times to 64-bit.
This design becomes particularly important when we get to functions that
involve hundreds of lines of glibc code rather than thin wrappers round
syscalls - for example, some pthreads functions.
--
Joseph S. Myers
joseph@codesourcery.com