This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC v6 08/23] RISC-V: Define __NR_* as __NR_*_time64/64 for 32-bit
- From: Alistair Francis <alistair23 at gmail dot com>
- To: Arnd Bergmann <arnd at arndb dot de>
- Cc: 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>, Joseph Myers <joseph at codesourcery 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: Wed, 15 Jan 2020 17:03:43 +1000
- Subject: Re: [RFC v6 08/23] RISC-V: Define __NR_* as __NR_*_time64/64 for 32-bit
- References: <cover.1578824547.git.alistair.francis@wdc.com> <cfa2ae3aaba20454673c0bb6e77be535f41272fe.1578824547.git.alistair.francis@wdc.com> <CAK8P3a3wvrn1KEMqZUxTw=J8TZ0NSUmxM=6PzCXpduNU5bqqcw@mail.gmail.com> <CAKmqyKMLNWaktaPsBm2QPc-_-HcBNRknkTjBj5JAu4sEMP0fnw@mail.gmail.com> <CAK8P3a0jpvzUPwMzGvJLyuDheYEeF1GvxGxApsv9=u9JDhp1fw@mail.gmail.com>
On Tue, Jan 14, 2020 at 10:48 PM Arnd Bergmann <arnd@arndb.de> wrote:
>
> On Tue, Jan 14, 2020 at 8:15 AM Alistair Francis <alistair23@gmail.com> wrote:
> > On Mon, Jan 13, 2020 at 11:39 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > > On Sun, Jan 12, 2020 at 11:40 AM Alistair Francis
> > > <alistair.francis@wdc.com> wrote:
> > >
> > > > +# ifndef __NR_timer_gettime
> > > > +# define __NR_timer_gettime __NR_timer_gettime64
> > > > +# endif
> > > > +
> > > > +# ifndef __NR_timer_settime
> > > > +# define __NR_timer_settime __NR_timer_settime64
> > > > +# endif
> > > > +
> > > > +# ifndef __NR_clock_getres
> > > > +# define __NR_clock_getres __NR_clock_getres_time64
> > > > +# endif
> > > > +
> > > > +# ifndef __NR_clock_gettime
> > > > +# define __NR_clock_gettime __NR_clock_gettime64
> > > > +# endif
> > >
> > > What about clock_nanosleep and io_pgetevents?
> >
> > I don't think we need clock_nanosleep as it has it's own C file and as
> > __ASSUME_TIME64_SYSCALLS is defined we can only ever call the *_time64
> > version. I think this actually applies to a few of the #defines in
> > this patch and that they can be removed.
>
> Ok.
>
> > My thoughts (maybe wrongly) with these #defines was to use this to
> > allow glibc to build and eventually we could remove these. The current
> > ones are what is required to allow the "old" calls in glibc to
> > transparently call the "new" ones and as we are using a 64-bit time_t
> > we can happily just change the syscall to the *_time64 version.
>
> I would certainly like that better, using the same names for the
> system calls as the kernel, and across all 32-bit architectures
> seems less confusing for readers, so the fewer redirects are needed,
> the better.
Great! In which case I will keep this list as short as possible.
Alistair
>
> Arnd