[PATCH] Fix __clock_gettime64 with _ISOMAC in sysdeps/generic/hp-timing.h

H.J. Lu hjl.tools@gmail.com
Thu May 28 12:28:30 GMT 2020


On Wed, May 27, 2020 at 5:50 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * H. J. Lu:
>
> > On Wed, May 27, 2020 at 5:44 AM Florian Weimer <fweimer@redhat.com> wrote:
> >>
> >> * Andreas Schwab:
> >>
> >> > I don't think it make sense for benchtests to define _ISMAC if it uses
> >> > glibc internal interfaces.
> >>
> >> We have some internal interfaces that are available for !_ISOMAC,
> >> e.g. pretty much the entire support/ directory.
> >>
> >> I assume this is about <hp-timing.h>?  We could decide that it should be
> >> in this category as well.
> >
> > To be precise, it is sysdeps/generic/hp-timing.h:
> >
> > #define HP_TIMING_NOW(var) \
> > ({ \
> >   struct __timespec64 tv; \
> >   __clock_gettime64 (CLOCK_MONOTONIC, &tv); \
> >   (var) = (tv.tv_nsec + UINT64_C(1000000000) * tv.tv_sec); \
> > })
>
> Okay, then we could add an #ifdef _ISOMAC and use clock_gettime outside
> glibc.  Temporarily, until we have clock_gettime64 available outside
> glibc, too.
>

Like this?

-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-__clock_gettime64-with-_ISOMAC-in-sysdeps-generi.patch
Type: application/x-patch
Size: 2025 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20200528/9f180857/attachment.bin>


More information about the Libc-alpha mailing list