unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Alistair Francis <alistair.francis@wdc.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH v2 1/2] sysdeps: Add clock_gettime64 vDSO
Date: Mon, 18 Nov 2019 13:40:51 -0800	[thread overview]
Message-ID: <CAKmqyKPw++iP_NyQfqk=5PROtPkYygKDiQnk+Kw8UKySqNf4aQ@mail.gmail.com> (raw)
In-Reply-To: <20191110025658.3149-1-alistair.francis@wdc.com>

On Sat, Nov 9, 2019 at 7:02 PM Alistair Francis
<alistair.francis@wdc.com> wrote:
>
> Add support for the clock_gettim64 vDSO calls. These are protected by
> the HAVE_CLOCK_GETTIME64_VSYSCALL define.
>
> HAVE_CLOCK_GETTIME64_VSYSCALL should be defined for 32-bit platforms
> (WORDSIZE == 32) that only run on the 5.1 kernel or later. WORDSIZE ==
> 64 platforms can use #define __vdso_clock_gettime64 __vdso_clock_gettime
> and use the __vdso_clock_gettime syscall as they don't have a
> __vdso_clock_gettime64 call.
>
>         * sysdeps/unix/sysv/linux/init-first.c: Add clock_gettime64
>         vDSO.
>         * sysdeps/unix/sysv/linux/libc-vdso.h: Likewise.

Ping!

Alistair

> ---
>  sysdeps/unix/sysv/linux/init-first.c | 10 ++++++++++
>  sysdeps/unix/sysv/linux/libc-vdso.h  |  4 ++++
>  2 files changed, 14 insertions(+)
>
> diff --git a/sysdeps/unix/sysv/linux/init-first.c b/sysdeps/unix/sysv/linux/init-first.c
> index d90ca820be0..d005d133220 100644
> --- a/sysdeps/unix/sysv/linux/init-first.c
> +++ b/sysdeps/unix/sysv/linux/init-first.c
> @@ -24,6 +24,11 @@
>  int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
>    attribute_hidden;
>  #endif
> +/* vDSO symbol used on clock_gettime64 implementation.  */
> +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
> +int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *)
> +  attribute_hidden;
> +#endif
>  /* vDSO symbol used on clock_getres implementation.  */
>  #ifdef HAVE_CLOCK_GETRES_VSYSCALL
>  int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
> @@ -52,6 +57,11 @@ __libc_vdso_platform_setup (void)
>      = get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME_VSYSCALL);
>  #endif
>
> +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
> +  VDSO_SYMBOL(clock_gettime64)
> +    = get_vdso_mangle_symbol (HAVE_CLOCK_GETTIME64_VSYSCALL);
> +#endif
> +
>  #ifdef HAVE_CLOCK_GETRES_VSYSCALL
>    VDSO_SYMBOL(clock_getres)
>      = get_vdso_mangle_symbol (HAVE_CLOCK_GETRES_VSYSCALL);
> diff --git a/sysdeps/unix/sysv/linux/libc-vdso.h b/sysdeps/unix/sysv/linux/libc-vdso.h
> index 792ac39d85a..c6d505bab39 100644
> --- a/sysdeps/unix/sysv/linux/libc-vdso.h
> +++ b/sysdeps/unix/sysv/linux/libc-vdso.h
> @@ -32,6 +32,10 @@
>  extern int (*VDSO_SYMBOL(clock_gettime)) (clockid_t, struct timespec *)
>    attribute_hidden;
>  #endif
> +#ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
> +extern int (*VDSO_SYMBOL(clock_gettime64)) (clockid_t, struct __timespec64 *)
> +  attribute_hidden;
> +#endif
>  #ifdef HAVE_CLOCK_GETRES_VSYSCALL
>  extern int (*VDSO_SYMBOL(clock_getres)) (clockid_t, struct timespec *)
>    attribute_hidden;
> --
> 2.23.0
>

  parent reply	other threads:[~2019-11-18 21:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10  2:56 [PATCH v2 1/2] sysdeps: Add clock_gettime64 vDSO Alistair Francis
2019-11-10  2:56 ` [PATCH v2 2/2] sysdeps/clock_gettime: Use clock_gettime64 if avaliable Alistair Francis
2019-11-21 17:46   ` Adhemerval Zanella
2019-11-21 18:37     ` Alistair Francis
2019-11-18 21:40 ` Alistair Francis [this message]
2019-11-21 17:46 ` [PATCH v2 1/2] sysdeps: Add clock_gettime64 vDSO Adhemerval Zanella
2019-11-21 18:19   ` 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='CAKmqyKPw++iP_NyQfqk=5PROtPkYygKDiQnk+Kw8UKySqNf4aQ@mail.gmail.com' \
    --to=alistair23@gmail.com \
    --cc=alistair.francis@wdc.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).