[PATCH 2/3] Y2038: nptl: Provide futex_abstimed_wait64 supporting 64 bit time
Lukasz Majewski
lukma@denx.de
Wed Sep 16 06:58:05 GMT 2020
Hi Andreas,
> On Sep 15 2020, Lukasz Majewski wrote:
>
> > diff --git a/sysdeps/nptl/futex-internal.c
> > b/sysdeps/nptl/futex-internal.c index adb3c20611..9f17881e47 100644
> > --- a/sysdeps/nptl/futex-internal.c
> > +++ b/sysdeps/nptl/futex-internal.c
> > @@ -41,6 +41,25 @@ __futex_abstimed_wait_cancellable32 (unsigned
> > int* futex_word, &ts32, NULL /* Unused. */,
> > FUTEX_BITSET_MATCH_ANY);
> > }
> > +
> > +static int
> > +__futex_abstimed_wait32 (unsigned int* futex_word,
> > + unsigned int expected, clockid_t clockid,
> > + const struct __timespec64* abstime,
> > + int private)
> > +{
> > + if (! in_time_t_range (abstime->tv_sec))
> > + return -EOVERFLOW;
> > +
> > + unsigned int clockbit = (clockid == CLOCK_REALTIME) ?
> > + FUTEX_CLOCK_REALTIME : 0;
> > + int op = __lll_private_flag (FUTEX_WAIT_BITSET | clockbit,
> > private); +
> > + struct timespec ts32 = valid_timespec64_to_timespec (*abstime);
>
> abstime may be NULL.
Thanks for pointing this out. Although the pthread_rwlock_rdlock
syscalls have *abstime marked as non-null, the used afterwards
__pthread_rwlock_rdlock_full64() passes NULL as abstime.
I will fix this and submit v2.
>
> Andreas.
>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20200916/5adbfdc1/attachment.sig>
More information about the Libc-alpha
mailing list