From: Arnd Bergmann <arnd@arndb.de>
To: Alistair Francis <alistair.francis@wdc.com>
Cc: GNU C Library <libc-alpha@sourceware.org>,
Alistair Francis <alistair23@gmail.com>
Subject: Re: [PATCH] tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex
Date: Fri, 31 Jan 2020 22:47:26 +0100 [thread overview]
Message-ID: <CAK8P3a1Af3ZxKjgOW_out1n+vcmwRNbRKvEAHuy1Nxtvz8cahg@mail.gmail.com> (raw)
In-Reply-To: <20200131170354.25539-1-alistair.francis@wdc.com>
On Fri, Jan 31, 2020 at 6:10 PM Alistair Francis
<alistair.francis@wdc.com> wrote:
>
> We can't include sysdep.h in the test case (it introduces lots of
> strange failures) so __NR_futex isn't redifined to __NR_futex_time64 by
> 64-bit time_t 32-bit archs (y2038 safe).
>
> To allow the test to pass let's just do the __NR_futex_time64 syscall if
> we don't have __NR_futex defined.
> ---
> sysdeps/unix/sysv/linux/tst-clone3.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
> index 400eb89a5b..613cb4a811 100644
> --- a/sysdeps/unix/sysv/linux/tst-clone3.c
> +++ b/sysdeps/unix/sysv/linux/tst-clone3.c
> @@ -56,7 +56,11 @@ f (void *a)
> static inline int
> futex_wait (int *futexp, int val)
> {
> +#ifdef __NR_futex
> return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
> +#else
> + return syscall (__NR_futex_time64, futexp, FUTEX_WAIT, val);
> +#endif
> }
There are other references to __NR_futex and INTERNAL_SYSCALL (futex, ...)
that likely suffer from the same problem. Would it make sense to address
those all at once?
Arnd
next prev parent reply other threads:[~2020-01-31 21:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-31 17:03 [PATCH] tst-clone3: Use __NR_futex_time64 if we don't have __NR_futex Alistair Francis
2020-01-31 21:47 ` Arnd Bergmann [this message]
2020-01-31 23:46 ` Alistair Francis
2020-02-14 16:40 ` Alistair Francis
2020-02-14 17:55 ` Adhemerval Zanella
-- strict thread matches above, loose matches on Subject: below --
2019-11-12 17:36 Alistair Francis
2019-12-03 18:56 ` Alistair Francis
2019-12-09 18:54 ` Alistair Francis
2019-12-20 4:02 ` Alistair Francis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAK8P3a1Af3ZxKjgOW_out1n+vcmwRNbRKvEAHuy1Nxtvz8cahg@mail.gmail.com \
--to=arnd@arndb.de \
--cc=alistair.francis@wdc.com \
--cc=alistair23@gmail.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).